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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp/js/viewer.min.js')
-rw-r--r--src/main/webapp/js/viewer.min.js658
1 files changed, 329 insertions, 329 deletions
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 48826080..2b67498f 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.5.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.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.5.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -1976,15 +1976,15 @@ Editor.printImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5
Editor.refreshImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE3LjY1IDYuMzVDMTYuMiA0LjkgMTQuMjEgNCAxMiA0Yy00LjQyIDAtNy45OSAzLjU4LTcuOTkgOHMzLjU3IDggNy45OSA4YzMuNzMgMCA2Ljg0LTIuNTUgNy43My02aC0yLjA4Yy0uODIgMi4zMy0zLjA0IDQtNS42NSA0LTMuMzEgMC02LTIuNjktNi02czIuNjktNiA2LTZjMS42NiAwIDMuMTQuNjkgNC4yMiAxLjc4TDEzIDExaDdWNGwtMi4zNSAyLjM1eiIvPjwvc3ZnPg==";
Editor.backImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIiBvcGFjaXR5PSIuODciLz48cGF0aCBkPSJNMTcuNTEgMy44N0wxNS43MyAyLjEgNS44NCAxMmw5LjkgOS45IDEuNzctMS43N0w5LjM4IDEybDguMTMtOC4xM3oiLz48L3N2Zz4=";Editor.closeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIiBvcGFjaXR5PSIuODciLz48cGF0aCBkPSJNMTIgMkM2LjQ3IDIgMiA2LjQ3IDIgMTJzNC40NyAxMCAxMCAxMCAxMC00LjQ3IDEwLTEwUzE3LjUzIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTMuNTktMTNMMTIgMTAuNTkgOC40MSA3IDcgOC40MSAxMC41OSAxMiA3IDE1LjU5IDguNDEgMTcgMTIgMTMuNDEgMTUuNTkgMTcgMTcgMTUuNTkgMTMuNDEgMTIgMTcgOC40MXoiLz48L3N2Zz4=";
Editor.closeBlackImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjZweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjZweCI+PGVsbGlwc2UgY3g9IjEyIiBjeT0iMTIiIHJ4PSI5IiByeT0iOSIgc3Ryb2tlPSJub25lIiBmaWxsPSIjMDAwIi8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE0LjU5IDhMMTIgMTAuNTkgOS40MSA4IDggOS40MSAxMC41OSAxMiA4IDE0LjU5IDkuNDEgMTYgMTIgMTMuNDEgMTQuNTkgMTYgMTYgMTQuNTkgMTMuNDEgMTIgMTYgOS40MSAxNC41OSA4ek0xMiAyQzYuNDcgMiAyIDYuNDcgMiAxMnM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTBTMTcuNTMgMiAxMiAyem0wIDE4Yy00LjQxIDAtOC0zLjU5LTgtOHMzLjU5LTggOC04IDggMy41OSA4IDgtMy41OSA4LTggOHoiLz48L3N2Zz4=";
-Editor.minusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTEwIDI1LjV2LTNoMjh2M1oiLz48L3N2Zz4=";Editor.plusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==";Editor.addBoxImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTIyLjUgMzRoM3YtOC41SDM0di0zaC04LjVWMTRoLTN2OC41SDE0djNoOC41Wk05IDQycS0xLjIgMC0yLjEtLjlRNiA0MC4yIDYgMzlWOXEwLTEuMi45LTIuMVE3LjggNiA5IDZoMzBxMS4yIDAgMi4xLjkuOS45LjkgMi4xdjMwcTAgMS4yLS45IDIuMS0uOS45LTIuMS45Wm0wLTNoMzBWOUg5djMwWk05IDl2MzBWOVoiLz48L3N2Zz4=";
-Editor.shapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTMwIDMwWm0tMTQgNC45cS41LjEuOTc1LjFIMThxLjMgMCAuNTI1LS4wMjUuMjI1LS4wMjUuNDc1LS4wMjVWNDFoMjJWMTloLTYuMDVxLjA1LS4yNS4wNS0uNXYtMS41MjVxMC0uNDc1LS4xLS45NzVINDFxMS4yNSAwIDIuMTI1Ljg3NVQ0NCAxOXYyMnEwIDEuMjUtLjg3NSAyLjEyNVQ0MSA0NEgxOXEtMS4yNSAwLTIuMTI1LS44NzVUMTYgNDFabTItMi45cS01Ljg1IDAtOS45MjUtNC4wNzVRNCAyMy44NSA0IDE4cTAtNS44NSA0LjA3NS05LjkyNVExMi4xNSA0IDE4IDRxNS44NSAwIDkuOTI1IDQuMDc1UTMyIDEyLjE1IDMyIDE4cTAgNS44NS00LjA3NSA5LjkyNVEyMy44NSAzMiAxOCAzMlptMC0zcTQuNTUgMCA3Ljc3NS0zLjIyNVEyOSAyMi41NSAyOSAxOHEwLTQuNTUtMy4yMjUtNy43NzVRMjIuNTUgNyAxOCA3cS00LjU1IDAtNy43NzUgMy4yMjVRNyAxMy40NSA3IDE4cTAgNC41NSAzLjIyNSA3Ljc3NVExMy40NSAyOSAxOCAyOVptMC0xMVoiLz48L3N2Zz4=";
+Editor.minusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTEwIDI1LjV2LTNoMjh2M1oiLz48L3N2Zz4=";Editor.plusImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==";Editor.addBoxImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTExIDE3aDJ2LTRoNHYtMmgtNFY3aC0ydjRIN3YyaDRabS02IDRxLS44MjUgMC0xLjQxMy0uNTg3UTMgMTkuODI1IDMgMTlWNXEwLS44MjUuNTg3LTEuNDEzUTQuMTc1IDMgNSAzaDE0cS44MjUgMCAxLjQxMy41ODdRMjEgNC4xNzUgMjEgNXYxNHEwIC44MjUtLjU4NyAxLjQxM1ExOS44MjUgMjEgMTkgMjFabTAtMmgxNFY1SDV2MTRaTTUgNXYxNFY1WiIvPjwvc3ZnPg==";
+Editor.shapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTE1IDE1Wm0tNyAyLjk1cS4yNS4wMjUuNDg4LjAzOFE4LjcyNSAxOCA5IDE4dC41MTItLjAxMnEuMjM4LS4wMTMuNDg4LS4wMzhWMjBoMTBWMTBoLTIuMDVxLjAyNS0uMjUuMDM4LS40ODhRMTggOS4yNzUgMTggOXQtLjAxMi0uNTEyUTE3Ljk3NSA4LjI1IDE3Ljk1IDhIMjBxLjgyNSAwIDEuNDEzLjU4N1EyMiA5LjE3NSAyMiAxMHYxMHEwIC44MjUtLjU4NyAxLjQxM1EyMC44MjUgMjIgMjAgMjJIMTBxLS44MjUgMC0xLjQxMi0uNTg3UTggMjAuODI1IDggMjBaTTkgMTZxLTIuOTI1IDAtNC45NjMtMi4wMzhRMiAxMS45MjUgMiA5dDIuMDM3LTQuOTYzUTYuMDc1IDIgOSAycTIuOTI1IDAgNC45NjMgMi4wMzdRMTYgNi4wNzUgMTYgOXEwIDIuOTI1LTIuMDM3IDQuOTYyUTExLjkyNSAxNiA5IDE2Wm0wLTJxMi4wNzUgMCAzLjUzOC0xLjQ2M1ExNCAxMS4wNzUgMTQgOXQtMS40NjItMy41MzdRMTEuMDc1IDQgOSA0IDYuOTI1IDQgNS40NjMgNS40NjMgNCA2LjkyNSA0IDl0MS40NjMgMy41MzdRNi45MjUgMTQgOSAxNFptMC01WiIvPjwvc3ZnPg==";
Editor.formatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==";
Editor.freehandImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==";
Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==";
-Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
+Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTE1IDIxLTYtMi4xLTQuNjUgMS44cS0uNS4yLS45MjUtLjExM1EzIDIwLjI3NSAzIDE5Ljc1di0xNHEwLS4zMjUuMTg4LS41NzUuMTg3LS4yNS41MTItLjM3NUw5IDNsNiAyLjEgNC42NS0xLjhxLjUtLjIuOTI1LjExMi40MjUuMzEzLjQyNS44Mzh2MTRxMCAuMzI1LS4xODguNTc1LS4xODcuMjUtLjUxMi4zNzVabS0xLTIuNDVWNi44NWwtNC0xLjR2MTEuN1ptMiAwIDMtMVY1LjdsLTMgMS4xNVpNNSAxOC4zbDMtMS4xNVY1LjQ1bC0zIDFaTTE2IDYuODV2MTEuN1ptLTgtMS40djExLjdaIi8+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.compareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTE1Ljg1IDQwLTIuMS0yLjEgNi4wNS02LjA1SDR2LTNoMTUuOGwtNi4wNS02LjA1IDIuMS0yLjEgOS42NSA5LjY1Wm0xNi4zLTEyLjctOS42NS05LjY1TDMyLjE1IDhsMi4xIDIuMS02LjA1IDYuMDVINDR2M0gyOC4ybDYuMDUgNi4wNVoiLz48L3N2Zz4=";
-Editor.expandMoreImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTI0IDMwLjc1LTEyLTEyIDIuMTUtMi4xNUwyNCAyNi41bDkuODUtOS44NUwzNiAxOC44WiIvPjwvc3ZnPg==";Editor.expandLessImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTE0LjE1IDMwLjc1IDEyIDI4LjZsMTItMTIgMTIgMTEuOTUtMi4xNSAyLjE1TDI0IDIwLjg1WiIvPjwvc3ZnPg==";Editor.gearImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTE5LjQgNDQtMS02LjNxLS45NS0uMzUtMi0uOTV0LTEuODUtMS4yNWwtNS45IDIuN0w0IDMwbDUuNC0zLjk1cS0uMS0uNDUtLjEyNS0xLjAyNVE5LjI1IDI0LjQ1IDkuMjUgMjRxMC0uNDUuMDI1LTEuMDI1VDkuNCAyMS45NUw0IDE4bDQuNjUtOC4yIDUuOSAyLjdxLjgtLjY1IDEuODUtMS4yNXQyLS45bDEtNi4zNWg5LjJsMSA2LjNxLjk1LjM1IDIuMDI1LjkyNVEzMi43IDExLjggMzMuNDUgMTIuNWw1LjktMi43TDQ0IDE4bC01LjQgMy44NXEuMS41LjEyNSAxLjA3NS4wMjUuNTc1LjAyNSAxLjA3NXQtLjAyNSAxLjA1cS0uMDI1LjU1LS4xMjUgMS4wNUw0NCAzMGwtNC42NSA4LjItNS45LTIuN3EtLjguNjUtMS44MjUgMS4yNzUtMS4wMjUuNjI1LTIuMDI1LjkyNWwtMSA2LjNaTTI0IDMwLjVxMi43IDAgNC42LTEuOSAxLjktMS45IDEuOS00LjYgMC0yLjctMS45LTQuNi0xLjktMS45LTQuNi0xLjktMi43IDAtNC42IDEuOS0xLjkgMS45LTEuOSA0LjYgMCAyLjcgMS45IDQuNiAxLjkgMS45IDQuNiAxLjlabTAtM3EtMS40NSAwLTIuNDc1LTEuMDI1UTIwLjUgMjUuNDUgMjAuNSAyNHEwLTEuNDUgMS4wMjUtMi40NzVRMjIuNTUgMjAuNSAyNCAyMC41cTEuNDUgMCAyLjQ3NSAxLjAyNVEyNy41IDIyLjU1IDI3LjUgMjRxMCAxLjQ1LTEuMDI1IDIuNDc1UTI1LjQ1IDI3LjUgMjQgMjcuNVptMC0zLjVabS0yLjIgMTdoNC40bC43LTUuNnExLjY1LS40IDMuMTI1LTEuMjVUMzIuNyAzMi4xbDUuMyAyLjMgMi0zLjYtNC43LTMuNDVxLjItLjg1LjMyNS0xLjY3NS4xMjUtLjgyNS4xMjUtMS42NzUgMC0uODUtLjEtMS42NzUtLjEtLjgyNS0uMzUtMS42NzVMNDAgMTcuMmwtMi0zLjYtNS4zIDIuM3EtMS4xNS0xLjMtMi42LTIuMTc1LTEuNDUtLjg3NS0zLjItMS4xMjVMMjYuMiA3aC00LjRsLS43IDUuNnEtMS43LjM1LTMuMTc1IDEuMi0xLjQ3NS44NS0yLjYyNSAyLjFMMTAgMTMuNmwtMiAzLjYgNC43IDMuNDVxLS4yLjg1LS4zMjUgMS42NzUtLjEyNS44MjUtLjEyNSAxLjY3NSAwIC44NS4xMjUgMS42NzUuMTI1LjgyNS4zMjUgMS42NzVMOCAzMC44bDIgMy42IDUuMy0yLjNxMS4yIDEuMiAyLjY3NSAyLjA1UTE5LjQ1IDM1IDIxLjEgMzUuNFoiLz48L3N2Zz4=";
-Editor.extensionImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTE3LjggNDJIOXEtMS4yIDAtMi4xLS45UTYgNDAuMiA2IDM5di04LjhxMi4yLS4yNSAzLjc3NS0xLjcyNVExMS4zNSAyNyAxMS4zNSAyNC44NXQtMS41NzUtMy42MjVROC4yIDE5Ljc1IDYgMTkuNXYtOC44cTAtMS4yLjktMi4xLjktLjkgMi4xLS45aDguODVxLjU1LTIgMS45NzUtMy4zNVQyMy4yNSAzcTIgMCAzLjQyNSAxLjM1UTI4LjEgNS43IDI4LjY1IDcuN2g4LjY1cTEuMiAwIDIuMS45LjkuOS45IDIuMXY4LjY1cTIgLjU1IDMuMjc1IDIuMDc1IDEuMjc1IDEuNTI1IDEuMjc1IDMuNTI1dC0xLjI3NSAzLjM1UTQyLjMgMjkuNjUgNDAuMyAzMC4yVjM5cTAgMS4yLS45IDIuMS0uOS45LTIuMS45aC04LjhxLS4yNS0yLjQtMS43NzUtMy44NzVUMjMuMTUgMzYuNjVxLTIuMDUgMC0zLjU3NSAxLjQ3NVExOC4wNSAzOS42IDE3LjggNDJaTTkgMzloNi41cTEuMjUtMy4wNSAzLjUtNC4yIDIuMjUtMS4xNSA0LjE1LTEuMTUgMS45IDAgNC4xNSAxLjE1IDIuMjUgMS4xNSAzLjUgNC4yaDYuNVYyNy4yNWgyLjI1cTEgMCAxLjY1LS42NS42NS0uNjUuNjUtMS42NSAwLTEtLjY1LTEuNjUtLjY1LS42NS0xLjY1LS42NUgzNy4zVjEwLjdIMjUuNTVWOC4zcTAtMS0uNjUtMS42NVEyNC4yNSA2IDIzLjI1IDZxLTEgMC0xLjY1LjY1LS42NS42NS0uNjUgMS42NXYyLjRIOXY2LjVxMi40LjkgMy44NzUgM3QxLjQ3NSA0LjY1cTAgMi41NS0xLjQ3NSA0LjY1UTExLjQgMzEuNiA5IDMyLjVabTE2LjQ1LTE2LjVaIi8+PC9zdmc+";
+Editor.expandMoreImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTEyIDE1LjM3NS02LTYgMS40LTEuNCA0LjYgNC42IDQuNi00LjYgMS40IDEuNFoiLz48L3N2Zz4=";Editor.expandLessImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTcuNCAxNS4zNzUtMS40LTEuNCA2LTYgNiA2LTEuNCAxLjQtNC42LTQuNloiLz48L3N2Zz4=";Editor.gearImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0ibTkuMjUgMjItLjQtMy4ycS0uMzI1LS4xMjUtLjYxMi0uMy0uMjg4LS4xNzUtLjU2My0uMzc1TDQuNyAxOS4zNzVsLTIuNzUtNC43NSAyLjU3NS0xLjk1UTQuNSAxMi41IDQuNSAxMi4zMzd2LS42NzVxMC0uMTYyLjAyNS0uMzM3TDEuOTUgOS4zNzVsMi43NS00Ljc1IDIuOTc1IDEuMjVxLjI3NS0uMi41NzUtLjM3NS4zLS4xNzUuNi0uM2wuNC0zLjJoNS41bC40IDMuMnEuMzI1LjEyNS42MTMuMy4yODcuMTc1LjU2Mi4zNzVsMi45NzUtMS4yNSAyLjc1IDQuNzUtMi41NzUgMS45NXEuMDI1LjE3NS4wMjUuMzM3di42NzVxMCAuMTYzLS4wNS4zMzhsMi41NzUgMS45NS0yLjc1IDQuNzUtMi45NS0xLjI1cS0uMjc1LjItLjU3NS4zNzUtLjMuMTc1LS42LjNsLS40IDMuMlptMi44LTYuNXExLjQ1IDAgMi40NzUtMS4wMjVRMTUuNTUgMTMuNDUgMTUuNTUgMTJxMC0xLjQ1LTEuMDI1LTIuNDc1UTEzLjUgOC41IDEyLjA1IDguNXEtMS40NzUgMC0yLjQ4OCAxLjAyNVE4LjU1IDEwLjU1IDguNTUgMTJxMCAxLjQ1IDEuMDEyIDIuNDc1UTEwLjU3NSAxNS41IDEyLjA1IDE1LjVabTAtMnEtLjYyNSAwLTEuMDYyLS40MzgtLjQzOC0uNDM3LS40MzgtMS4wNjJ0LjQzOC0xLjA2MnEuNDM3LS40MzggMS4wNjItLjQzOHQxLjA2My40MzhxLjQzNy40MzcuNDM3IDEuMDYydC0uNDM3IDEuMDYycS0uNDM4LjQzOC0xLjA2My40MzhaTTEyIDEyWm0tMSA4aDEuOTc1bC4zNS0yLjY1cS43NzUtLjIgMS40MzgtLjU4OC42NjItLjM4NyAxLjIxMi0uOTM3bDIuNDc1IDEuMDI1Ljk3NS0xLjctMi4xNS0xLjYyNXEuMTI1LS4zNS4xNzUtLjczOC4wNS0uMzg3LjA1LS43ODd0LS4wNS0uNzg4cS0uMDUtLjM4Ny0uMTc1LS43MzdsMi4xNS0xLjYyNS0uOTc1LTEuNy0yLjQ3NSAxLjA1cS0uNTUtLjU3NS0xLjIxMi0uOTYzLS42NjMtLjM4Ny0xLjQzOC0uNTg3TDEzIDRoLTEuOTc1bC0uMzUgMi42NXEtLjc3NS4yLTEuNDM3LjU4Ny0uNjYzLjM4OC0xLjIxMy45MzhMNS41NSA3LjE1bC0uOTc1IDEuNyAyLjE1IDEuNnEtLjEyNS4zNzUtLjE3NS43NS0uMDUuMzc1LS4wNS44IDAgLjQuMDUuNzc1dC4xNzUuNzVsLTIuMTUgMS42MjUuOTc1IDEuNyAyLjQ3NS0xLjA1cS41NS41NzUgMS4yMTMuOTYyLjY2Mi4zODggMS40MzcuNTg4WiIvPjwvc3ZnPg==";
+Editor.extensionImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHdpZHRoPSIyNCI+PHBhdGggZD0iTTguOCAyMUg1cS0uODI1IDAtMS40MTMtLjU4N1EzIDE5LjgyNSAzIDE5di0zLjhxMS4yIDAgMi4xLS43NjIuOS0uNzYzLjktMS45MzggMC0xLjE3NS0uOS0xLjkzOFE0LjIgOS44IDMgOS44VjZxMC0uODI1LjU4Ny0xLjQxMlE0LjE3NSA0IDUgNGg0cTAtMS4wNS43MjUtMS43NzVRMTAuNDUgMS41IDExLjUgMS41cTEuMDUgMCAxLjc3NS43MjVRMTQgMi45NSAxNCA0aDRxLjgyNSAwIDEuNDEzLjU4OFEyMCA1LjE3NSAyMCA2djRxMS4wNSAwIDEuNzc1LjcyNS43MjUuNzI1LjcyNSAxLjc3NSAwIDEuMDUtLjcyNSAxLjc3NVEyMS4wNSAxNSAyMCAxNXY0cTAgLjgyNS0uNTg3IDEuNDEzUTE4LjgyNSAyMSAxOCAyMWgtMy44cTAtMS4yNS0uNzg3LTIuMTI1UTEyLjYyNSAxOCAxMS41IDE4dC0xLjkxMi44NzVROC44IDE5Ljc1IDguOCAyMVpNNSAxOWgyLjEyNXEuNi0xLjY1IDEuOTI1LTIuMzI1UTEwLjM3NSAxNiAxMS41IDE2cTEuMTI1IDAgMi40NS42NzUgMS4zMjUuNjc1IDEuOTI1IDIuMzI1SDE4di02aDJxLjIgMCAuMzUtLjE1LjE1LS4xNS4xNS0uMzUgMC0uMi0uMTUtLjM1UTIwLjIgMTIgMjAgMTJoLTJWNmgtNlY0cTAtLjItLjE1LS4zNS0uMTUtLjE1LS4zNS0uMTUtLjIgMC0uMzUuMTVRMTEgMy44IDExIDR2Mkg1djIuMnExLjM1LjUgMi4xNzUgMS42NzVROCAxMS4wNSA4IDEyLjVxMCAxLjQyNS0uODI1IDIuNlQ1IDE2LjhabTcuNzUtNy43NVoiLz48L3N2Zz4=";
Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage;Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];
Editor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;
Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isDarkMode=function(b){return Editor.darkMode};Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};
@@ -2079,32 +2079,32 @@ mxGraphView.prototype.createBackgroundPageShape=function(D){return new mxRectang
K*R),this.scale*(this.translate.y+d*F),this.scale*(Math.ceil(Math.max(1,N+D.width/this.scale)/R)-K)*R,this.scale*(Math.ceil(Math.max(1,S+D.height/this.scale)/F)-d)*F)};var l=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(D,N){l.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=D+"px",this.view.backgroundPageShape.node.style.marginTop=
N+"px")};var B=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(D,N,S,F,K,R){var d=B.apply(this,arguments);null==R||R||mxEvent.addListener(d,"mousedown",function(f){mxEvent.consume(f)});return d};var q=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(D,N,S){var F=this.graph.model.getParent(D);if(N){var K=this.graph.model.isEdge(D)?null:this.graph.getCellGeometry(D);K=!this.graph.model.isEdge(F)&&!this.graph.isSiblingSelected(D)&&
(null!=K&&K.relative||!this.graph.isContainer(F)||this.graph.isPart(D))}else if(K=q.apply(this,arguments),this.graph.isTableCell(D)||this.graph.isTableRow(D))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(D)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(D)&&this.graph.isCellSelected(F);return K};mxPopupMenuHandler.prototype.getCellForPopupEvent=
-function(D){D=D.getCell();for(var N=this.graph.getModel(),S=N.getParent(D),F=this.graph.view.getState(S),K=this.graph.isCellSelected(D);null!=F&&(N.isVertex(S)||N.isEdge(S));){var R=this.graph.isCellSelected(S);K=K||R;if(R||!K&&(this.graph.isTableCell(D)||this.graph.isTableRow(D)))D=S;S=N.getParent(S)}return D}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var l=this.editor.graph;l.lightbox=k;var B=l.getGraphBounds;l.getGraphBounds=function(){var T=B.apply(this,arguments),ca=this.backgroundImage;if(null!=ca&&null!=ca.width&&null!=ca.height){var Y=this.view.translate,p=this.view.scale;T=mxRectangle.fromRectangle(T);T.add(new mxRectangle((Y.x+ca.x)*p,(Y.y+ca.y)*p,ca.width*p,ca.height*p))}return T};l.useCssTransforms&&(this.lazyZoomDelay=
-0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(T,ca){this.clearSelectionState()});l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+function(D){D=D.getCell();for(var N=this.graph.getModel(),S=N.getParent(D),F=this.graph.view.getState(S),K=this.graph.isCellSelected(D);null!=F&&(N.isVertex(S)||N.isEdge(S));){var R=this.graph.isCellSelected(S);K=K||R;if(R||!K&&(this.graph.isTableCell(D)||this.graph.isTableRow(D)))D=S;S=N.getParent(S)}return D}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var l=this.editor.graph;l.lightbox=k;var B=l.getGraphBounds;l.getGraphBounds=function(){var T=B.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var Y=this.view.translate,p=this.view.scale;T=mxRectangle.fromRectangle(T);T.add(new mxRectangle((Y.x+ba.x)*p,(Y.y+ba.y)*p,ba.width*p,ba.height*p))}return T};l.useCssTransforms&&(this.lazyZoomDelay=
+0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(T,ba){this.clearSelectionState()});l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
l.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);l.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);l.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);l.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,l.isEnabled=function(){return!1},l.panningHandler.isForcePanningEvent=function(T){return!mxEvent.isPopupTrigger(T.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!l.standalone){var q="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),D="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-N="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),S=!1,F=!1;this.setDefaultStyle=function(T){try{l.getModel().isEdge(T)?F=!1:S=!1;var ca=l.getCellStyle(T,!1),Y=[],p=[],E;for(E in ca)Y.push(ca[E]),p.push(E);l.getModel().isEdge(T)?l.currentEdgeStyle={}:l.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",p,"values",Y,"cells",[T]));l.getModel().isEdge(T)?F=!0:S=!0}catch(Q){this.handleError(Q)}};this.clearDefaultStyle=
+N="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),S=!1,F=!1;this.setDefaultStyle=function(T){try{l.getModel().isEdge(T)?F=!1:S=!1;var ba=l.getCellStyle(T,!1),Y=[],p=[],E;for(E in ba)Y.push(ba[E]),p.push(E);l.getModel().isEdge(T)?l.currentEdgeStyle={}:l.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",p,"values",Y,"cells",[T]));l.getModel().isEdge(T)?F=!0:S=!0}catch(Q){this.handleError(Q)}};this.clearDefaultStyle=
function(){l.currentEdgeStyle=mxUtils.clone(l.defaultEdgeStyle);l.currentVertexStyle=mxUtils.clone(l.defaultVertexStyle);S=F=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var K=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<K.length;e++)0>mxUtils.indexOf(q,K[e])&&q.push(K[e]);var R="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),d=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
-"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<d.length;e++)for(k=0;k<d[e].length;k++)q.push(d[e][k]);for(e=0;e<D.length;e++)0>mxUtils.indexOf(q,D[e])&&q.push(D[e]);var f=function(T,ca,Y,p,E,Q,Z){p=null!=p?p:l.currentVertexStyle;E=null!=E?E:l.currentEdgeStyle;Q=null!=Q?Q:!0;Y=null!=Y?Y:l.getModel();if(Z){Z=[];for(var W=0;W<T.length;W++)Z=Z.concat(Y.getDescendants(T[W]));T=Z}Y.beginUpdate();try{for(W=0;W<T.length;W++){var X=T[W];if(ca)var da=
+"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<d.length;e++)for(k=0;k<d[e].length;k++)q.push(d[e][k]);for(e=0;e<D.length;e++)0>mxUtils.indexOf(q,D[e])&&q.push(D[e]);var f=function(T,ba,Y,p,E,Q,Z){p=null!=p?p:l.currentVertexStyle;E=null!=E?E:l.currentEdgeStyle;Q=null!=Q?Q:!0;Y=null!=Y?Y:l.getModel();if(Z){Z=[];for(var W=0;W<T.length;W++)Z=Z.concat(Y.getDescendants(T[W]));T=Z}Y.beginUpdate();try{for(W=0;W<T.length;W++){var X=T[W];if(ba)var da=
["fontSize","fontFamily","fontColor"];else{var la=Y.getStyle(X),pa=null!=la?la.split(";"):[];da=q.slice();for(var ma=0;ma<pa.length;ma++){var qa=pa[ma],za=qa.indexOf("=");if(0<=za){var ya=qa.substring(0,za),ra=mxUtils.indexOf(da,ya);0<=ra&&da.splice(ra,1);for(Z=0;Z<d.length;Z++){var ta=d[Z];if(0<=mxUtils.indexOf(ta,ya))for(var Aa=0;Aa<ta.length;Aa++){var Oa=mxUtils.indexOf(da,ta[Aa]);0<=Oa&&da.splice(Oa,1)}}}}}var Ka=Y.isEdge(X);Z=Ka?E:p;var Ma=Y.getStyle(X);for(ma=0;ma<da.length;ma++){ya=da[ma];
-var Ga=Z[ya];null!=Ga&&"edgeStyle"!=ya&&("shape"!=ya||Ka)&&(!Ka||Q||0>mxUtils.indexOf(N,ya))&&(Ma=mxUtils.setStyle(Ma,ya,Ga))}Editor.simpleLabels&&(Ma=mxUtils.setStyle(mxUtils.setStyle(Ma,"html",null),"whiteSpace",null));Y.setStyle(X,Ma)}}finally{Y.endUpdate()}return T};l.addListener("cellsInserted",function(T,ca){f(ca.getProperty("cells"),null,null,null,null,!0,!0)});l.addListener("textInserted",function(T,ca){f(ca.getProperty("cells"),!0)});this.insertHandler=f;this.createDivs();this.createUi();
+var Ga=Z[ya];null!=Ga&&"edgeStyle"!=ya&&("shape"!=ya||Ka)&&(!Ka||Q||0>mxUtils.indexOf(N,ya))&&(Ma=mxUtils.setStyle(Ma,ya,Ga))}Editor.simpleLabels&&(Ma=mxUtils.setStyle(mxUtils.setStyle(Ma,"html",null),"whiteSpace",null));Y.setStyle(X,Ma)}}finally{Y.endUpdate()}return T};l.addListener("cellsInserted",function(T,ba){f(ba.getProperty("cells"),null,null,null,null,!0,!0)});l.addListener("textInserted",function(T,ba){f(ba.getProperty("cells"),!0)});this.insertHandler=f;this.createDivs();this.createUi();
this.refresh();var g=mxUtils.bind(this,function(T){null==T&&(T=window.event);return l.isEditing()||null!=T&&this.isSelectionAllowed(T)});this.container==document.body&&(this.menubarContainer.onselectstart=g,this.menubarContainer.onmousedown=g,this.toolbarContainer.onselectstart=g,this.toolbarContainer.onmousedown=g,this.diagramContainer.onselectstart=g,this.diagramContainer.onmousedown=g,this.sidebarContainer.onselectstart=g,this.sidebarContainer.onmousedown=g,this.formatContainer.onselectstart=g,
-this.formatContainer.onmousedown=g,this.footerContainer.onselectstart=g,this.footerContainer.onmousedown=g,null!=this.tabContainer&&(this.tabContainer.onselectstart=g));!this.editor.chromeless||this.editor.editable?(e=function(T){if(null!=T){var ca=mxEvent.getSource(T);if("A"==ca.nodeName)for(;null!=ca;){if("geHint"==ca.className)return!0;ca=ca.parentNode}}return g(T)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-e):this.diagramContainer.oncontextmenu=e):l.panningHandler.usePopupTrigger=!1;l.init(this.diagramContainer);mxClient.IS_SVG&&null!=l.view.getDrawPane()&&(e=l.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=l.graphHandler){var u=l.graphHandler.start;l.graphHandler.start=function(){null!=oa.hoverIcons&&oa.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(T){var ca=
-mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(T)-ca.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(T)-ca.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var x=!1,A=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(T,ca){return x||A.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(T){32!=T.which||l.isEditing()?mxEvent.isConsumed(T)||
+this.formatContainer.onmousedown=g,this.footerContainer.onselectstart=g,this.footerContainer.onmousedown=g,null!=this.tabContainer&&(this.tabContainer.onselectstart=g));!this.editor.chromeless||this.editor.editable?(e=function(T){if(null!=T){var ba=mxEvent.getSource(T);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return g(T)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+e):this.diagramContainer.oncontextmenu=e):l.panningHandler.usePopupTrigger=!1;l.init(this.diagramContainer);mxClient.IS_SVG&&null!=l.view.getDrawPane()&&(e=l.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=l.graphHandler){var u=l.graphHandler.start;l.graphHandler.start=function(){null!=oa.hoverIcons&&oa.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(T){var ba=
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(T)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(T)-ba.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var x=!1,A=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(T,ba){return x||A.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(T){32!=T.which||l.isEditing()?mxEvent.isConsumed(T)||
27!=T.keyCode||this.hideDialog(null,!0):(x=!0,this.hoverIcons.reset(),l.container.style.cursor="move",l.isEditing()||mxEvent.getSource(T)!=l.container||mxEvent.consume(T))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(T){l.container.style.cursor="";x=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var H=l.panningHandler.isForcePanningEvent;l.panningHandler.isForcePanningEvent=function(T){return H.apply(this,arguments)||x||mxEvent.isMouseEvent(T.getEvent())&&
(this.usePopupTrigger||!mxEvent.isPopupTrigger(T.getEvent()))&&(!mxEvent.isControlDown(T.getEvent())&&mxEvent.isRightMouseButton(T.getEvent())||mxEvent.isMiddleMouseButton(T.getEvent()))};var P=l.cellEditor.isStopEditingEvent;l.cellEditor.isStopEditingEvent=function(T){return P.apply(this,arguments)||13==T.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T)||mxClient.IS_SF&&mxEvent.isShiftDown(T))};var M=l.isZoomWheelEvent;l.isZoomWheelEvent=function(){return x||
-M.apply(this,arguments)};var G=!1,ia=null,ja=null,ha=null,ba=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=l.cellEditor.isContentEditing()){for(var T=this.toolbar.container.firstChild,ca=[];null!=T;){var Y=T.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,T)&&(T.parentNode.removeChild(T),ca.push(T));T=Y}T=this.toolbar.fontMenu;Y=this.toolbar.sizeMenu;if(null==ha)this.toolbar.createTextToolbar();else{for(var p=0;p<ha.length;p++)this.toolbar.container.appendChild(ha[p]);this.toolbar.fontMenu=
-ia;this.toolbar.sizeMenu=ja}G=l.cellEditor.isContentEditing();ia=T;ja=Y;ha=ca}}),oa=this,sa=l.cellEditor.startEditing;l.cellEditor.startEditing=function(){sa.apply(this,arguments);ba();if(l.cellEditor.isContentEditing()){var T=!1,ca=function(){T||(T=!0,window.setTimeout(function(){var Y=l.getSelectedEditingElement();null!=Y&&(Y=mxUtils.getCurrentStyle(Y),null!=Y&&null!=oa.toolbar&&(oa.toolbar.setFontName(Graph.stripQuotes(Y.fontFamily)),oa.toolbar.setFontSize(parseInt(Y.fontSize))));T=!1},0))};mxEvent.addListener(l.cellEditor.textarea,
-"input",ca);mxEvent.addListener(l.cellEditor.textarea,"touchend",ca);mxEvent.addListener(l.cellEditor.textarea,"mouseup",ca);mxEvent.addListener(l.cellEditor.textarea,"keyup",ca);ca()}};var J=l.cellEditor.stopEditing;l.cellEditor.stopEditing=function(T,ca){try{J.apply(this,arguments),ba()}catch(Y){oa.handleError(Y)}};l.container.setAttribute("tabindex","0");l.container.style.cursor="default";if(window.self===window.top&&null!=l.container.parentNode)try{l.container.focus()}catch(T){}var V=l.fireMouseEvent;
-l.fireMouseEvent=function(T,ca,Y){T==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};l.popupMenuHandler.autoExpand=!0;null!=this.menus&&(l.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(T,ca,Y){this.menus.createPopupMenu(T,ca,Y)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(T){l.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};l.connectionHandler.addListener(mxEvent.CONNECT,
-function(T,ca){var Y=[ca.getProperty("cell")];ca.getProperty("terminalInserted")&&(Y.push(ca.getProperty("terminal")),window.setTimeout(function(){null!=oa.hoverIcons&&oa.hoverIcons.update(l.view.getState(Y[Y.length-1]))},0));f(Y)});this.addListener("styleChanged",mxUtils.bind(this,function(T,ca){var Y=ca.getProperty("cells"),p=T=!1;if(0<Y.length)for(var E=0;E<Y.length&&(T=l.getModel().isVertex(Y[E])||T,!(p=l.getModel().isEdge(Y[E])||p)||!T);E++);else p=T=!0;T=T&&!S;p=p&&!F;Y=ca.getProperty("keys");
-ca=ca.getProperty("values");for(E=0;E<Y.length;E++){var Q=0<=mxUtils.indexOf(K,Y[E]);if("strokeColor"!=Y[E]||null!=ca[E]&&"none"!=ca[E])if(0<=mxUtils.indexOf(D,Y[E]))p||0<=mxUtils.indexOf(R,Y[E])?null==ca[E]?delete l.currentEdgeStyle[Y[E]]:l.currentEdgeStyle[Y[E]]=ca[E]:T&&0<=mxUtils.indexOf(q,Y[E])&&(null==ca[E]?delete l.currentVertexStyle[Y[E]]:l.currentVertexStyle[Y[E]]=ca[E]);else if(0<=mxUtils.indexOf(q,Y[E])){if(T||Q)null==ca[E]?delete l.currentVertexStyle[Y[E]]:l.currentVertexStyle[Y[E]]=ca[E];
-if(p||Q||0<=mxUtils.indexOf(R,Y[E]))null==ca[E]?delete l.currentEdgeStyle[Y[E]]:l.currentEdgeStyle[Y[E]]=ca[E]}}null!=this.toolbar&&(this.toolbar.setFontName(l.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(l.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==l.currentEdgeStyle.edgeStyle&&"1"==l.currentEdgeStyle.curved?"geSprite geSprite-curved":
+M.apply(this,arguments)};var G=!1,ia=null,ja=null,ha=null,ca=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=l.cellEditor.isContentEditing()){for(var T=this.toolbar.container.firstChild,ba=[];null!=T;){var Y=T.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,T)&&(T.parentNode.removeChild(T),ba.push(T));T=Y}T=this.toolbar.fontMenu;Y=this.toolbar.sizeMenu;if(null==ha)this.toolbar.createTextToolbar();else{for(var p=0;p<ha.length;p++)this.toolbar.container.appendChild(ha[p]);this.toolbar.fontMenu=
+ia;this.toolbar.sizeMenu=ja}G=l.cellEditor.isContentEditing();ia=T;ja=Y;ha=ba}}),oa=this,sa=l.cellEditor.startEditing;l.cellEditor.startEditing=function(){sa.apply(this,arguments);ca();if(l.cellEditor.isContentEditing()){var T=!1,ba=function(){T||(T=!0,window.setTimeout(function(){var Y=l.getSelectedEditingElement();null!=Y&&(Y=mxUtils.getCurrentStyle(Y),null!=Y&&null!=oa.toolbar&&(oa.toolbar.setFontName(Graph.stripQuotes(Y.fontFamily)),oa.toolbar.setFontSize(parseInt(Y.fontSize))));T=!1},0))};mxEvent.addListener(l.cellEditor.textarea,
+"input",ba);mxEvent.addListener(l.cellEditor.textarea,"touchend",ba);mxEvent.addListener(l.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(l.cellEditor.textarea,"keyup",ba);ba()}};var J=l.cellEditor.stopEditing;l.cellEditor.stopEditing=function(T,ba){try{J.apply(this,arguments),ca()}catch(Y){oa.handleError(Y)}};l.container.setAttribute("tabindex","0");l.container.style.cursor="default";if(window.self===window.top&&null!=l.container.parentNode)try{l.container.focus()}catch(T){}var V=l.fireMouseEvent;
+l.fireMouseEvent=function(T,ba,Y){T==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};l.popupMenuHandler.autoExpand=!0;null!=this.menus&&(l.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(T,ba,Y){this.menus.createPopupMenu(T,ba,Y)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(T){l.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};l.connectionHandler.addListener(mxEvent.CONNECT,
+function(T,ba){var Y=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(Y.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=oa.hoverIcons&&oa.hoverIcons.update(l.view.getState(Y[Y.length-1]))},0));f(Y)});this.addListener("styleChanged",mxUtils.bind(this,function(T,ba){var Y=ba.getProperty("cells"),p=T=!1;if(0<Y.length)for(var E=0;E<Y.length&&(T=l.getModel().isVertex(Y[E])||T,!(p=l.getModel().isEdge(Y[E])||p)||!T);E++);else p=T=!0;T=T&&!S;p=p&&!F;Y=ba.getProperty("keys");
+ba=ba.getProperty("values");for(E=0;E<Y.length;E++){var Q=0<=mxUtils.indexOf(K,Y[E]);if("strokeColor"!=Y[E]||null!=ba[E]&&"none"!=ba[E])if(0<=mxUtils.indexOf(D,Y[E]))p||0<=mxUtils.indexOf(R,Y[E])?null==ba[E]?delete l.currentEdgeStyle[Y[E]]:l.currentEdgeStyle[Y[E]]=ba[E]:T&&0<=mxUtils.indexOf(q,Y[E])&&(null==ba[E]?delete l.currentVertexStyle[Y[E]]:l.currentVertexStyle[Y[E]]=ba[E]);else if(0<=mxUtils.indexOf(q,Y[E])){if(T||Q)null==ba[E]?delete l.currentVertexStyle[Y[E]]:l.currentVertexStyle[Y[E]]=ba[E];
+if(p||Q||0<=mxUtils.indexOf(R,Y[E]))null==ba[E]?delete l.currentEdgeStyle[Y[E]]:l.currentEdgeStyle[Y[E]]=ba[E]}}null!=this.toolbar&&(this.toolbar.setFontName(l.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(l.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==l.currentEdgeStyle.edgeStyle&&"1"==l.currentEdgeStyle.curved?"geSprite geSprite-curved":
"straight"==l.currentEdgeStyle.edgeStyle||"none"==l.currentEdgeStyle.edgeStyle||null==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==l.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==l.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==l.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
-"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==l.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==l.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==l.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var T=l.currentVertexStyle.fontFamily||"Helvetica",ca=String(l.currentVertexStyle.fontSize||
-"12"),Y=l.getView().getState(l.getSelectionCell());null!=Y&&(T=Y.style[mxConstants.STYLE_FONTFAMILY]||T,ca=Y.style[mxConstants.STYLE_FONTSIZE]||ca,10<T.length&&(T=T.substring(0,8)+"..."));this.toolbar.setFontName(T);this.toolbar.setFontSize(ca)}),l.getSelectionModel().addListener(mxEvent.CHANGE,b),l.getModel().addListener(mxEvent.CHANGE,b));l.addListener(mxEvent.CELLS_ADDED,function(T,ca){T=ca.getProperty("cells");ca=ca.getProperty("parent");null!=ca&&l.getModel().isLayer(ca)&&!l.isCellVisible(ca)&&
-null!=T&&0<T.length&&l.getModel().setVisible(ca,!0)});this.gestureHandler=mxUtils.bind(this,function(T){null!=this.currentMenu&&mxEvent.getSource(T)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){this.windowResized()});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",
+"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==l.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==l.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==l.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var T=l.currentVertexStyle.fontFamily||"Helvetica",ba=String(l.currentVertexStyle.fontSize||
+"12"),Y=l.getView().getState(l.getSelectionCell());null!=Y&&(T=Y.style[mxConstants.STYLE_FONTFAMILY]||T,ba=Y.style[mxConstants.STYLE_FONTSIZE]||ba,10<T.length&&(T=T.substring(0,8)+"..."));this.toolbar.setFontName(T);this.toolbar.setFontSize(ba)}),l.getSelectionModel().addListener(mxEvent.CHANGE,b),l.getModel().addListener(mxEvent.CHANGE,b));l.addListener(mxEvent.CELLS_ADDED,function(T,ba){T=ba.getProperty("cells");ba=ba.getProperty("parent");null!=ba&&l.getModel().isLayer(ba)&&!l.isCellVisible(ba)&&
+null!=T&&0<T.length&&l.getModel().setVisible(ba,!0)});this.gestureHandler=mxUtils.bind(this,function(T){null!=this.currentMenu&&mxEvent.getSource(T)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){this.windowResized()});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",
this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){l.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){l.view.validateBackground()}));
l.addListener("gridSizeChanged",mxUtils.bind(this,function(){l.isGridEnabled()&&l.view.validateBackground()}));this.editor.resetGraph()}this.init();l.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(b,e,k){function l(N,S){var F=q;q+=S;return N.substring(F,q)}function B(N){N=l(N,4);return N.charCodeAt(3)+(N.charCodeAt(2)<<8)+(N.charCodeAt(1)<<16)+(N.charCodeAt(0)<<24)}var q=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(l(b,4),"IHDR"!=l(b,4))null!=k&&k();else{l(b,17);do{k=B(b);var D=l(b,4);if(null!=e&&e(q-8,D,k))break;value=l(b,k);l(b,4);if("IEND"==D)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
@@ -2174,15 +2174,15 @@ function(Y){mxEvent.isTouchEvent(Y)||(mxEvent.isShiftDown(Y)||x(30),u())}));mxEv
mxEvent.consume(Y)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(Y){mxEvent.isTouchEvent(Y)||x(30)}));var G=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(Y,p){this.startX=p.getGraphX();this.startY=p.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(Y,p){},mouseUp:function(Y,p){mxEvent.isTouchEvent(p.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
G&&Math.abs(this.scrollTop-b.container.scrollTop)<G&&Math.abs(this.startX-p.getGraphX())<G&&Math.abs(this.startY-p.getGraphY())<G&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?u():x(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ia=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var Y=this.graph.getPagePadding(),p=this.graph.getPageSize();this.translate.x=Y.x-(this.x0||
0)*p.width;this.translate.y=Y.y-(this.y0||0)*p.height}ia.apply(this,arguments)};if(!b.isViewer()){var ja=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var Y=this.getPageLayout(),p=this.getPagePadding(),E=this.getPageSize(),Q=Math.ceil(2*p.x+Y.width*E.width),Z=Math.ceil(2*p.y+Y.height*E.height),W=b.minimumGraphSize;if(null==W||W.width!=Q||W.height!=Z)b.minimumGraphSize=new mxRectangle(0,0,Q,Z);Q=p.x-Y.x*E.width;p=p.y-Y.y*E.height;this.autoTranslate||
-this.view.translate.x==Q&&this.view.translate.y==p?ja.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=Y.x,this.view.y0=Y.y,Y=b.view.translate.x,E=b.view.translate.y,b.view.setTranslate(Q,p),b.container.scrollLeft+=Math.round((Q-Y)*b.view.scale),b.container.scrollTop+=Math.round((p-E)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ha=b.view.getBackgroundPane(),ba=b.view.getDrawPane();b.cumulativeZoomFactor=1;
-var oa=null,sa=null,J=null,V=null,T=null,ca=function(Y){null!=oa&&window.clearTimeout(oa);0<=Y&&window.setTimeout(function(){if(!b.isMouseDown||V)oa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),ba.style.transformOrigin="",ha.style.transformOrigin=
-"",mxClient.IS_SF?(ba.style.transform="scale(1)",ha.style.transform="scale(1)",window.setTimeout(function(){ba.style.transform="";ha.style.transform=""},0)):(ba.style.transform="",ha.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var p=new mxPoint(b.container.scrollLeft,b.container.scrollTop),E=mxUtils.getOffset(b.container),Q=b.view.scale,Z=0,W=0;null!=sa&&(Z=b.container.offsetWidth/2-sa.x+E.x,W=b.container.offsetHeight/2-sa.y+E.y);b.zoom(b.cumulativeZoomFactor,
-null,b.isFastZoomEnabled()?20:null);b.view.scale!=Q&&(null!=J&&(Z+=p.x-J.x,W+=p.y-J.y),null!=e&&k.chromelessResize(!1,null,Z*(b.cumulativeZoomFactor-1),W*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==Z&&0==W||(b.container.scrollLeft-=Z*(b.cumulativeZoomFactor-1),b.container.scrollTop-=W*(b.cumulativeZoomFactor-1)));null!=T&&ba.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=V=sa=J=oa=null}),null!=Y?Y:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+this.view.translate.x==Q&&this.view.translate.y==p?ja.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=Y.x,this.view.y0=Y.y,Y=b.view.translate.x,E=b.view.translate.y,b.view.setTranslate(Q,p),b.container.scrollLeft+=Math.round((Q-Y)*b.view.scale),b.container.scrollTop+=Math.round((p-E)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ha=b.view.getBackgroundPane(),ca=b.view.getDrawPane();b.cumulativeZoomFactor=1;
+var oa=null,sa=null,J=null,V=null,T=null,ba=function(Y){null!=oa&&window.clearTimeout(oa);0<=Y&&window.setTimeout(function(){if(!b.isMouseDown||V)oa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),ca.style.transformOrigin="",ha.style.transformOrigin=
+"",mxClient.IS_SF?(ca.style.transform="scale(1)",ha.style.transform="scale(1)",window.setTimeout(function(){ca.style.transform="";ha.style.transform=""},0)):(ca.style.transform="",ha.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var p=new mxPoint(b.container.scrollLeft,b.container.scrollTop),E=mxUtils.getOffset(b.container),Q=b.view.scale,Z=0,W=0;null!=sa&&(Z=b.container.offsetWidth/2-sa.x+E.x,W=b.container.offsetHeight/2-sa.y+E.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=Q&&(null!=J&&(Z+=p.x-J.x,W+=p.y-J.y),null!=e&&k.chromelessResize(!1,null,Z*(b.cumulativeZoomFactor-1),W*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==Z&&0==W||(b.container.scrollLeft-=Z*(b.cumulativeZoomFactor-1),b.container.scrollTop-=W*(b.cumulativeZoomFactor-1)));null!=T&&ca.setAttribute("filter",T);b.cumulativeZoomFactor=1;T=V=sa=J=oa=null}),null!=Y?Y:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
function(Y,p,E,Q){Q=null!=Q?Q:this.zoomFactor;(p=p||!b.scrollbars)&&(sa=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));Y?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=Q,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/=Q,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==T&&""!=ba.getAttribute("filter")&&(T=ba.getAttribute("filter"),ba.removeAttribute("filter")),J=new mxPoint(b.container.scrollLeft,b.container.scrollTop),Y=p||null==sa?b.container.scrollLeft+
-b.container.clientWidth/2:sa.x+b.container.scrollLeft-b.container.offsetLeft,Q=p||null==sa?b.container.scrollTop+b.container.clientHeight/2:sa.y+b.container.scrollTop-b.container.offsetTop,ba.style.transformOrigin=Y+"px "+Q+"px",ba.style.transform="scale("+this.cumulativeZoomFactor+")",ha.style.transformOrigin=Y+"px "+Q+"px",ha.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(Y=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(Y.style,
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=Q,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==T&&""!=ca.getAttribute("filter")&&(T=ca.getAttribute("filter"),ca.removeAttribute("filter")),J=new mxPoint(b.container.scrollLeft,b.container.scrollTop),Y=p||null==sa?b.container.scrollLeft+
+b.container.clientWidth/2:sa.x+b.container.scrollLeft-b.container.offsetLeft,Q=p||null==sa?b.container.scrollTop+b.container.clientHeight/2:sa.y+b.container.scrollTop-b.container.offsetTop,ca.style.transformOrigin=Y+"px "+Q+"px",ca.style.transform="scale("+this.cumulativeZoomFactor+")",ha.style.transformOrigin=Y+"px "+Q+"px",ha.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(Y=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(Y.style,
"transform-origin",(p||null==sa?b.container.clientWidth/2+b.container.scrollLeft-Y.offsetLeft+"px":sa.x+b.container.scrollLeft-Y.offsetLeft-b.container.offsetLeft+"px")+" "+(p||null==sa?b.container.clientHeight/2+b.container.scrollTop-Y.offsetTop+"px":sa.y+b.container.scrollTop-Y.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(Y.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
-k.hoverIcons.reset());ca(b.isFastZoomEnabled()?E:0)};mxEvent.addGestureListeners(b.container,function(Y){null!=oa&&window.clearTimeout(oa)},null,function(Y){1!=b.cumulativeZoomFactor&&ca(0)});mxEvent.addListener(b.container,"scroll",function(Y){null==oa||b.isMouseDown||1==b.cumulativeZoomFactor||ca(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(Y,p,E,Q,Z){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!E&&b.isScrollWheelEvent(Y))E=
+k.hoverIcons.reset());ba(b.isFastZoomEnabled()?E:0)};mxEvent.addGestureListeners(b.container,function(Y){null!=oa&&window.clearTimeout(oa)},null,function(Y){1!=b.cumulativeZoomFactor&&ba(0)});mxEvent.addListener(b.container,"scroll",function(Y){null==oa||b.isMouseDown||1==b.cumulativeZoomFactor||ba(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(Y,p,E,Q,Z){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!E&&b.isScrollWheelEvent(Y))E=
b.view.getTranslate(),Q=40/b.view.scale,mxEvent.isShiftDown(Y)?b.view.setTranslate(E.x+(p?-Q:Q),E.y):b.view.setTranslate(E.x,E.y+(p?Q:-Q));else if(E||b.isZoomWheelEvent(Y))for(var W=mxEvent.getSource(Y);null!=W;){if(W==b.container)return b.tooltipHandler.hideTooltip(),sa=null!=Q&&null!=Z?new mxPoint(Q,Z):new mxPoint(mxEvent.getClientX(Y),mxEvent.getClientY(Y)),V=E,E=b.zoomFactor,Q=null,Y.ctrlKey&&null!=Y.deltaY&&40>Math.abs(Y.deltaY)&&Math.round(Y.deltaY)!=Y.deltaY?E=1+Math.abs(Y.deltaY)/20*(E-1):
null!=Y.movementY&&"pointermove"==Y.type&&(E=1+Math.max(1,Math.abs(Y.movementY))/20*(E-1),Q=-1),b.lazyZoom(p,null,Q,E),mxEvent.consume(Y),!1;W=W.parentNode}}),b.container);b.panningHandler.zoomGraph=function(Y){b.cumulativeZoomFactor=Y.scale;b.lazyZoom(0<Y.scale,!0);mxEvent.consume(Y)}};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)};
@@ -2234,9 +2234,9 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi
!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};
EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";b.style.display="inline-flex";b.style.alignItems="center";mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){var k=mxEvent.getSource(e);if("A"!=k.nodeName){var l=k.getAttribute("data-action");if("statusFunction"==l&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=l)k=this.actions.get(l),null!=k&&k.funct();else{l=k.getAttribute("data-title");var B=
k.getAttribute("data-message");null!=l&&null!=B?this.showError(l,B):(k=k.getAttribute("data-link"),null!=k&&this.editor.graph.openLink(k))}mxEvent.consume(e)}}));return b};
-EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&null!=b&&0<b.length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b));b=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=b)for(var e=0;e<b.length;e++)(function(k){mxUtils.setOpacity(k,0);mxUtils.setPrefixedStyle(k.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(k.style,"transition","all 0.2s ease");
-window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(k,100);mxUtils.setPrefixedStyle(k.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(k.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(k.style,"transform","scaleX(0)");mxUtils.setOpacity(k,0);window.setTimeout(mxUtils.bind(this,function(){null!=k.parentNode&&k.parentNode.removeChild(k)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};
-EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
+EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Graph.sanitizeHtml(b);0==this.statusContainer.getElementsByTagName("div").length&&null!=b&&0<b.length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b));b=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=b)for(var e=0;e<b.length;e++)(function(k){mxUtils.setOpacity(k,0);mxUtils.setPrefixedStyle(k.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(k.style,
+"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(k,100);mxUtils.setPrefixedStyle(k.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(k.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(k.style,"transform","scaleX(0)");mxUtils.setOpacity(k,0);window.setTimeout(mxUtils.bind(this,function(){null!=k.parentNode&&k.parentNode.removeChild(k)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};
+EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=Graph.sanitizeHtml(b);return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
EditorUi.prototype.addSplitHandler=function(b,e,k,l){function B(R){if(null!=D){var d=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));l(Math.max(0,N+(e?d.x-D.x:D.y-d.y)-k));mxEvent.consume(R);N!=K()&&(S=!0,F=null)}}function q(R){B(R);D=N=null}var D=null,N=null,S=!0,F=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var K=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+k-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){D=new mxPoint(mxEvent.getClientX(R),
mxEvent.getClientY(R));N=K();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var d=null!=F?F-k:0;F=K();l(d);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,B,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,B,q)})};
@@ -2252,9 +2252,9 @@ EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFr
EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(l){l.text().then(mxUtils.bind(this,function(B){try{var q=this.parseHtmlData(B),D="text/plain"!=q.getAttribute("data-type")?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);try{var N=D.lastIndexOf("%3E");
0<=N&&N<D.length-3&&(D=D.substring(0,N+3))}catch(K){}try{var S=q.getElementsByTagName("span"),F=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(D);this.isCompatibleString(F)&&(D=F)}catch(K){}}catch(K){}b(this.isCompatibleString(D)?D:null)}))["catch"](function(B){b(null)})}))["catch"](function(l){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(l){l.text().then(function(B){b(B)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(k){b(null)})};
-EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
-e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
-null!=b&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)):(k=e.getElementsByTagName("img"),1==k.length&&(k=k[0],b=k.getAttribute("src"),null!=b&&k.parentNode==e&&1==e.children.length&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(e)}asHtml||e.setAttribute("data-type","text/plain");return e};
+EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==e.firstChild.nodeName&&
+"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),null!=b&&(Editor.isPngDataUrl(b)&&
+(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)):(k=e.getElementsByTagName("img"),1==k.length&&(k=k[0],b=k.getAttribute("src"),null!=b&&k.parentNode==e&&1==e.children.length&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(e)}asHtml||e.setAttribute("data-type","text/plain");return e};
EditorUi.prototype.extractGraphModelFromEvent=function(b){var e=null,k=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?k=b.getData("Text"):(k=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==k||0==k.length)&&(k=b.getData("text/plain"))),null!=k&&(k=Graph.zapGremlins(mxUtils.trim(k)),b=this.extractGraphModelFromHtml(k),null!=b&&(k=b))));null!=k&&this.isCompatibleString(k)&&
(e=k);return e};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(e){this.save(e)}),null,mxUtils.bind(this,function(e){if(null!=e&&0<e.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,e);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(e.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(e))).simulate(document,
@@ -2291,36 +2291,35 @@ mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEv
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
Graph=function(b,e,k,l,B,q){mxGraph.call(this,b,e,k,l);this.themes=B||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=q?q:!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(J){J=this.getCurrentCellStyle(J);
return null!=J?"1"==J.html||"wrap"==J[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var D=null,N=null,S=null,F=null,K=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){J=V.getProperty("event");var T=J.getState();V=this.view.scale;if(!mxEvent.isAltDown(J.getEvent())&&null!=T)if(this.model.isEdge(T.cell))if(D=new mxPoint(J.getGraphX(),J.getGraphY()),K=this.isCellSelected(T.cell),S=T,N=J,null!=T.text&&null!=
-T.text.boundingBox&&mxUtils.contains(T.text.boundingBox,J.getGraphX(),J.getGraphY()))F=mxEvent.LABEL_HANDLE;else{var ca=this.selectionCellsHandler.getHandler(T.cell);null!=ca&&null!=ca.bends&&0<ca.bends.length&&(F=ca.getHandleForEvent(J))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(J.getEvent())&&(ca=this.selectionCellsHandler.getHandler(T.cell),null==ca||null==ca.getHandleForEvent(J))){var Y=new mxRectangle(J.getGraphX()-1,J.getGraphY()-1),p=mxEvent.isTouchEvent(J.getEvent())?
-mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ca=p+2;Y.grow(p);if(this.isTableCell(T.cell)&&!this.isCellSelected(T.cell)&&!(mxUtils.contains(T,J.getGraphX()-ca,J.getGraphY()-ca)&&mxUtils.contains(T,J.getGraphX()-ca,J.getGraphY()+ca)&&mxUtils.contains(T,J.getGraphX()+ca,J.getGraphY()+ca)&&mxUtils.contains(T,J.getGraphX()+ca,J.getGraphY()-ca))){var E=this.model.getParent(T.cell);ca=this.model.getParent(E);if(!this.isCellSelected(ca)){p*=V;var Q=2*p;if(this.model.getChildAt(ca,
-0)!=E&&mxUtils.intersects(Y,new mxRectangle(T.x,T.y-p,T.width,Q))||this.model.getChildAt(E,0)!=T.cell&&mxUtils.intersects(Y,new mxRectangle(T.x-p,T.y,Q,T.height))||mxUtils.intersects(Y,new mxRectangle(T.x,T.y+T.height-p,T.width,Q))||mxUtils.intersects(Y,new mxRectangle(T.x+T.width-p,T.y,Q,T.height)))E=this.selectionCellsHandler.isHandled(ca),this.selectCellForEvent(ca,J.getEvent()),ca=this.selectionCellsHandler.getHandler(ca),null!=ca&&(p=ca.getHandleForEvent(J),null!=p&&(ca.start(J.getGraphX(),J.getGraphY(),
-p),ca.blockDelayedSelection=!E,J.consume()))}}for(;!J.isConsumed()&&null!=T&&(this.isTableCell(T.cell)||this.isTableRow(T.cell)||this.isTable(T.cell));)this.isSwimlane(T.cell)&&(ca=this.getActualStartSize(T.cell),(0<ca.x||0<ca.width)&&mxUtils.intersects(Y,new mxRectangle(T.x+(ca.x-ca.width-1)*V+(0==ca.x?T.width:0),T.y,1,T.height))||(0<ca.y||0<ca.height)&&mxUtils.intersects(Y,new mxRectangle(T.x,T.y+(ca.y-ca.height-1)*V+(0==ca.y?T.height:0),T.width,1)))&&(this.selectCellForEvent(T.cell,J.getEvent()),
-ca=this.selectionCellsHandler.getHandler(T.cell),null!=ca&&(p=mxEvent.CUSTOM_HANDLE-ca.customHandles.length+1,ca.start(J.getGraphX(),J.getGraphY(),p),J.consume())),T=this.view.getState(this.model.getParent(T.cell))}}}));this.addMouseListener({mouseDown:function(J,V){},mouseMove:mxUtils.bind(this,function(J,V){J=this.selectionCellsHandler.handlers.map;for(var T in J)if(null!=J[T].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var ca=this.tolerance;
-if(null!=D&&null!=S&&null!=N){if(T=S,Math.abs(D.x-V.getGraphX())>ca||Math.abs(D.y-V.getGraphY())>ca){var Y=this.selectionCellsHandler.getHandler(T.cell);null==Y&&this.model.isEdge(T.cell)&&(Y=this.createHandler(T));if(null!=Y&&null!=Y.bends&&0<Y.bends.length){J=Y.getHandleForEvent(N);var p=this.view.getEdgeStyle(T);ca=p==mxEdgeStyle.EntityRelation;K||F!=mxEvent.LABEL_HANDLE||(J=F);if(ca&&0!=J&&J!=Y.bends.length-1&&J!=mxEvent.LABEL_HANDLE)!ca||null==T.visibleSourceState&&null==T.visibleTargetState||
-(this.graphHandler.reset(),V.consume());else if(J==mxEvent.LABEL_HANDLE||0==J||null!=T.visibleSourceState||J==Y.bends.length-1||null!=T.visibleTargetState)ca||J==mxEvent.LABEL_HANDLE||(ca=T.absolutePoints,null!=ca&&(null==p&&null==J||p==mxEdgeStyle.OrthConnector)&&(J=F,null==J&&(J=new mxRectangle(D.x,D.y),J.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(J,ca[0].x,ca[0].y)?J=0:mxUtils.contains(J,ca[ca.length-1].x,ca[ca.length-1].y)?J=Y.bends.length-1:null!=p&&(2==ca.length||3==
-ca.length&&(0==Math.round(ca[0].x-ca[1].x)&&0==Math.round(ca[1].x-ca[2].x)||0==Math.round(ca[0].y-ca[1].y)&&0==Math.round(ca[1].y-ca[2].y)))?J=2:(J=mxUtils.findNearestSegment(T,D.x,D.y),J=null==p?mxEvent.VIRTUAL_HANDLE-J:J+1))),null==J&&(J=mxEvent.VIRTUAL_HANDLE)),Y.start(V.getGraphX(),V.getGraphX(),J),V.consume(),this.graphHandler.reset()}null!=Y&&(this.selectionCellsHandler.isHandlerActive(Y)?this.isCellSelected(T.cell)||(this.selectionCellsHandler.handlers.put(T.cell,Y),this.selectCellForEvent(T.cell,
-V.getEvent())):this.isCellSelected(T.cell)||Y.destroy());K=!1;D=N=S=F=null}}else if(T=V.getState(),null!=T&&this.isCellEditable(T.cell)){Y=null;if(this.model.isEdge(T.cell)){if(J=new mxRectangle(V.getGraphX(),V.getGraphY()),J.grow(mxEdgeHandler.prototype.handleImage.width/2),ca=T.absolutePoints,null!=ca)if(null!=T.text&&null!=T.text.boundingBox&&mxUtils.contains(T.text.boundingBox,V.getGraphX(),V.getGraphY()))Y="move";else if(mxUtils.contains(J,ca[0].x,ca[0].y)||mxUtils.contains(J,ca[ca.length-1].x,
-ca[ca.length-1].y))Y="pointer";else if(null!=T.visibleSourceState||null!=T.visibleTargetState)J=this.view.getEdgeStyle(T),Y="crosshair",J!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(T)&&(V=mxUtils.findNearestSegment(T,V.getGraphX(),V.getGraphY()),V<ca.length-1&&0<=V&&(Y=0==Math.round(ca[V].x-ca[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){ca=mxShape.prototype.svgStrokeTolerance/2;J=new mxRectangle(V.getGraphX(),V.getGraphY());J.grow(ca);if(this.isTableCell(T.cell)&&
-(V=this.model.getParent(T.cell),ca=this.model.getParent(V),!this.isCellSelected(ca)))if(mxUtils.intersects(J,new mxRectangle(T.x,T.y-2,T.width,4))&&this.model.getChildAt(ca,0)!=V||mxUtils.intersects(J,new mxRectangle(T.x,T.y+T.height-2,T.width,4)))Y="row-resize";else if(mxUtils.intersects(J,new mxRectangle(T.x-2,T.y,4,T.height))&&this.model.getChildAt(V,0)!=T.cell||mxUtils.intersects(J,new mxRectangle(T.x+T.width-2,T.y,4,T.height)))Y="col-resize";for(V=T;null==Y&&null!=V&&(this.isTableCell(V.cell)||
-this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(ca=this.getActualStartSize(V.cell),p=this.view.scale,(0<ca.x||0<ca.width)&&mxUtils.intersects(J,new mxRectangle(V.x+(ca.x-ca.width-1)*p+(0==ca.x?V.width*p:0),V.y,1,V.height))?Y="col-resize":(0<ca.y||0<ca.height)&&mxUtils.intersects(J,new mxRectangle(V.x,V.y+(ca.y-ca.height-1)*p+(0==ca.y?V.height:0),V.width,1))&&(Y="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=Y&&T.setCursor(Y)}}}),mouseUp:mxUtils.bind(this,
-function(J,V){F=D=N=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(J){var V=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);J.view.graph.isHtmlLabel(J.cell)&&(V=1!=J.style.html?mxUtils.htmlEntities(V,!1):J.view.graph.sanitizeHtml(V));return V};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=
-this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(J,V){return!1};this.alternateEdgeStyle="vertical";null==l&&this.loadStylesheet();var R=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var J=R.apply(this,arguments);if(this.graph.pageVisible){var V=[],T=this.graph.pageFormat,
-ca=this.graph.pageScale,Y=T.width*ca;T=T.height*ca;ca=this.graph.view.translate;for(var p=this.graph.view.scale,E=this.graph.getPageLayout(),Q=0;Q<E.width;Q++)V.push(new mxRectangle(((E.x+Q)*Y+ca.x)*p,(E.y*T+ca.y)*p,Y*p,T*p));for(Q=1;Q<E.height;Q++)V.push(new mxRectangle((E.x*Y+ca.x)*p,((E.y+Q)*T+ca.y)*p,Y*p,T*p));J=V.concat(J)}return J};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(J,V){return null==J.cell?"#ffa500":mxConstants.GUIDE_COLOR};
-this.graphHandler.createPreviewShape=function(J){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(J){for(var V=d.apply(this,arguments),T=new mxDictionary,ca=[],Y=0;Y<V.length;Y++){var p=this.graph.isTableCell(J)&&this.graph.isTableCell(V[Y])&&this.graph.isCellSelected(V[Y])?this.graph.model.getParent(V[Y]):
-this.graph.isTableRow(J)&&this.graph.isTableRow(V[Y])&&this.graph.isCellSelected(V[Y])?V[Y]:this.graph.getCompositeParent(V[Y]);null==p||T.get(p)||(T.put(p,!0),ca.push(p))}return ca};var f=this.graphHandler.start;this.graphHandler.start=function(J,V,T,ca){var Y=!1;this.graph.isTableCell(J)&&(this.graph.isCellSelected(J)?Y=!0:J=this.graph.model.getParent(J));Y||this.graph.isTableRow(J)&&this.graph.isCellSelected(J)||(J=this.graph.getCompositeParent(J));f.apply(this,arguments)};this.connectionHandler.createTargetVertex=
-function(J,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this);this.getRubberband=function(){return g};var u=(new Date).getTime(),x=0,A=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var J=this.currentState;A.apply(this,arguments);J!=this.currentState?(u=(new Date).getTime(),x=0):x=(new Date).getTime()-u};var H=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
-function(J){return mxEvent.isShiftDown(J.getEvent())&&mxEvent.isAltDown(J.getEvent())?!1:null!=this.currentState&&J.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&H.apply(this,arguments)};var P=this.isToggleEvent;this.isToggleEvent=function(J){return P.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J)};var M=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(J){return M.apply(this,arguments)||
-mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==J.getState()&&mxEvent.isTouchEvent(J.getEvent())};var G=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(G=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=G)}));this.popupMenuHandler.autoExpand=
-!0;this.popupMenuHandler.isSelectOnPopup=function(J){return mxEvent.isMouseEvent(J.getEvent())};var ia=this.click;this.click=function(J){var V=null==J.state&&null!=J.sourceState&&this.isCellLocked(J.sourceState.cell);if(this.isEnabled()&&!V||J.isConsumed())return ia.apply(this,arguments);var T=V?J.sourceState.cell:J.getCell();null!=T&&(T=this.getClickableLinkForCell(T),null!=T&&(this.isCustomLink(T)?this.customLinkClicked(T):this.openLink(T)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=
-function(J){return J.sourceState};var ja=this.tooltipHandler.show;this.tooltipHandler.show=function(){ja.apply(this,arguments);if(null!=this.div)for(var J=this.div.getElementsByTagName("a"),V=0;V<J.length;V++)null!=J[V].getAttribute("href")&&null==J[V].getAttribute("target")&&J[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(J){return J.sourceState};this.getCursorForMouseEvent=function(J){var V=null==J.state&&null!=J.sourceState&&this.isCellLocked(J.sourceState.cell);
-return this.getCursorForCell(V?J.sourceState.cell:J.getCell())};var ha=this.getCursorForCell;this.getCursorForCell=function(J){if(!this.isEnabled()||this.isCellLocked(J)){if(null!=this.getClickableLinkForCell(J))return"pointer";if(this.isCellLocked(J))return"default"}return ha.apply(this,arguments)};this.selectRegion=function(J,V){var T=mxEvent.isAltDown(V)?J:null;J=this.getCells(J.x,J.y,J.width,J.height,null,null,T,function(ca){return"1"==mxUtils.getValue(ca.style,"locked","0")},!0);if(this.isToggleEvent(V))for(T=
-0;T<J.length;T++)this.selectCellForEvent(J[T],V);else this.selectCellsForEvent(J,V);return J};var ba=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(J,V,T){return this.graph.isCellSelected(J)?!1:ba.apply(this,arguments)};this.isCellLocked=function(J){for(;null!=J;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(J),"locked","0"))return!0;J=this.model.getParent(J)}return!1};var oa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,
-function(J,V){"mouseDown"==V.getProperty("eventName")&&(J=V.getProperty("event").getState(),oa=null==J||this.isSelectionEmpty()||this.isCellSelected(J.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(J,V){if(!mxEvent.isMultiTouchEvent(V)){J=V.getProperty("event");var T=V.getProperty("cell");null==T?(J=mxUtils.convertPoint(this.container,mxEvent.getClientX(J),mxEvent.getClientY(J)),g.start(J.x,J.y)):null!=oa?this.addSelectionCells(oa):1<this.getSelectionCount()&&
-this.isCellSelected(T)&&this.removeSelectionCell(T);oa=null;V.consume()}}));this.connectionHandler.selectCells=function(J,V){this.graph.setSelectionCell(V||J)};this.connectionHandler.constraintHandler.isStateIgnored=function(J,V){var T=J.view.graph;return V&&(T.isCellSelected(J.cell)||T.isTableRow(J.cell)&&T.selectionCellsHandler.isHandled(T.model.getParent(J.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var J=this.connectionHandler.constraintHandler;null!=J.currentFocus&&
-J.isStateIgnored(J.currentFocus,!0)&&(J.currentFocus=null,J.constraints=null,J.destroyIcons());J.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var sa=this.updateMouseEvent;this.updateMouseEvent=function(J){J=sa.apply(this,arguments);null!=J.state&&this.isCellLocked(J.getCell())&&(J.state=null);return J}}this.currentTranslate=new mxPoint(0,0)};
-Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
-Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
-Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
+T.text.boundingBox&&mxUtils.contains(T.text.boundingBox,J.getGraphX(),J.getGraphY()))F=mxEvent.LABEL_HANDLE;else{var ba=this.selectionCellsHandler.getHandler(T.cell);null!=ba&&null!=ba.bends&&0<ba.bends.length&&(F=ba.getHandleForEvent(J))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(J.getEvent())&&(ba=this.selectionCellsHandler.getHandler(T.cell),null==ba||null==ba.getHandleForEvent(J))){var Y=new mxRectangle(J.getGraphX()-1,J.getGraphY()-1),p=mxEvent.isTouchEvent(J.getEvent())?
+mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;ba=p+2;Y.grow(p);if(this.isTableCell(T.cell)&&!this.isCellSelected(T.cell)&&!(mxUtils.contains(T,J.getGraphX()-ba,J.getGraphY()-ba)&&mxUtils.contains(T,J.getGraphX()-ba,J.getGraphY()+ba)&&mxUtils.contains(T,J.getGraphX()+ba,J.getGraphY()+ba)&&mxUtils.contains(T,J.getGraphX()+ba,J.getGraphY()-ba))){var E=this.model.getParent(T.cell);ba=this.model.getParent(E);if(!this.isCellSelected(ba)){p*=V;var Q=2*p;if(this.model.getChildAt(ba,
+0)!=E&&mxUtils.intersects(Y,new mxRectangle(T.x,T.y-p,T.width,Q))||this.model.getChildAt(E,0)!=T.cell&&mxUtils.intersects(Y,new mxRectangle(T.x-p,T.y,Q,T.height))||mxUtils.intersects(Y,new mxRectangle(T.x,T.y+T.height-p,T.width,Q))||mxUtils.intersects(Y,new mxRectangle(T.x+T.width-p,T.y,Q,T.height)))E=this.selectionCellsHandler.isHandled(ba),this.selectCellForEvent(ba,J.getEvent()),ba=this.selectionCellsHandler.getHandler(ba),null!=ba&&(p=ba.getHandleForEvent(J),null!=p&&(ba.start(J.getGraphX(),J.getGraphY(),
+p),ba.blockDelayedSelection=!E,J.consume()))}}for(;!J.isConsumed()&&null!=T&&(this.isTableCell(T.cell)||this.isTableRow(T.cell)||this.isTable(T.cell));)this.isSwimlane(T.cell)&&(ba=this.getActualStartSize(T.cell),(0<ba.x||0<ba.width)&&mxUtils.intersects(Y,new mxRectangle(T.x+(ba.x-ba.width-1)*V+(0==ba.x?T.width:0),T.y,1,T.height))||(0<ba.y||0<ba.height)&&mxUtils.intersects(Y,new mxRectangle(T.x,T.y+(ba.y-ba.height-1)*V+(0==ba.y?T.height:0),T.width,1)))&&(this.selectCellForEvent(T.cell,J.getEvent()),
+ba=this.selectionCellsHandler.getHandler(T.cell),null!=ba&&(p=mxEvent.CUSTOM_HANDLE-ba.customHandles.length+1,ba.start(J.getGraphX(),J.getGraphY(),p),J.consume())),T=this.view.getState(this.model.getParent(T.cell))}}}));this.addMouseListener({mouseDown:function(J,V){},mouseMove:mxUtils.bind(this,function(J,V){J=this.selectionCellsHandler.handlers.map;for(var T in J)if(null!=J[T].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var ba=this.tolerance;
+if(null!=D&&null!=S&&null!=N){if(T=S,Math.abs(D.x-V.getGraphX())>ba||Math.abs(D.y-V.getGraphY())>ba){var Y=this.selectionCellsHandler.getHandler(T.cell);null==Y&&this.model.isEdge(T.cell)&&(Y=this.createHandler(T));if(null!=Y&&null!=Y.bends&&0<Y.bends.length){J=Y.getHandleForEvent(N);var p=this.view.getEdgeStyle(T);ba=p==mxEdgeStyle.EntityRelation;K||F!=mxEvent.LABEL_HANDLE||(J=F);if(ba&&0!=J&&J!=Y.bends.length-1&&J!=mxEvent.LABEL_HANDLE)!ba||null==T.visibleSourceState&&null==T.visibleTargetState||
+(this.graphHandler.reset(),V.consume());else if(J==mxEvent.LABEL_HANDLE||0==J||null!=T.visibleSourceState||J==Y.bends.length-1||null!=T.visibleTargetState)ba||J==mxEvent.LABEL_HANDLE||(ba=T.absolutePoints,null!=ba&&(null==p&&null==J||p==mxEdgeStyle.OrthConnector)&&(J=F,null==J&&(J=new mxRectangle(D.x,D.y),J.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(J,ba[0].x,ba[0].y)?J=0:mxUtils.contains(J,ba[ba.length-1].x,ba[ba.length-1].y)?J=Y.bends.length-1:null!=p&&(2==ba.length||3==
+ba.length&&(0==Math.round(ba[0].x-ba[1].x)&&0==Math.round(ba[1].x-ba[2].x)||0==Math.round(ba[0].y-ba[1].y)&&0==Math.round(ba[1].y-ba[2].y)))?J=2:(J=mxUtils.findNearestSegment(T,D.x,D.y),J=null==p?mxEvent.VIRTUAL_HANDLE-J:J+1))),null==J&&(J=mxEvent.VIRTUAL_HANDLE)),Y.start(V.getGraphX(),V.getGraphX(),J),V.consume(),this.graphHandler.reset()}null!=Y&&(this.selectionCellsHandler.isHandlerActive(Y)?this.isCellSelected(T.cell)||(this.selectionCellsHandler.handlers.put(T.cell,Y),this.selectCellForEvent(T.cell,
+V.getEvent())):this.isCellSelected(T.cell)||Y.destroy());K=!1;D=N=S=F=null}}else if(T=V.getState(),null!=T&&this.isCellEditable(T.cell)){Y=null;if(this.model.isEdge(T.cell)){if(J=new mxRectangle(V.getGraphX(),V.getGraphY()),J.grow(mxEdgeHandler.prototype.handleImage.width/2),ba=T.absolutePoints,null!=ba)if(null!=T.text&&null!=T.text.boundingBox&&mxUtils.contains(T.text.boundingBox,V.getGraphX(),V.getGraphY()))Y="move";else if(mxUtils.contains(J,ba[0].x,ba[0].y)||mxUtils.contains(J,ba[ba.length-1].x,
+ba[ba.length-1].y))Y="pointer";else if(null!=T.visibleSourceState||null!=T.visibleTargetState)J=this.view.getEdgeStyle(T),Y="crosshair",J!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(T)&&(V=mxUtils.findNearestSegment(T,V.getGraphX(),V.getGraphY()),V<ba.length-1&&0<=V&&(Y=0==Math.round(ba[V].x-ba[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){ba=mxShape.prototype.svgStrokeTolerance/2;J=new mxRectangle(V.getGraphX(),V.getGraphY());J.grow(ba);if(this.isTableCell(T.cell)&&
+(V=this.model.getParent(T.cell),ba=this.model.getParent(V),!this.isCellSelected(ba)))if(mxUtils.intersects(J,new mxRectangle(T.x,T.y-2,T.width,4))&&this.model.getChildAt(ba,0)!=V||mxUtils.intersects(J,new mxRectangle(T.x,T.y+T.height-2,T.width,4)))Y="row-resize";else if(mxUtils.intersects(J,new mxRectangle(T.x-2,T.y,4,T.height))&&this.model.getChildAt(V,0)!=T.cell||mxUtils.intersects(J,new mxRectangle(T.x+T.width-2,T.y,4,T.height)))Y="col-resize";for(V=T;null==Y&&null!=V&&(this.isTableCell(V.cell)||
+this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(ba=this.getActualStartSize(V.cell),p=this.view.scale,(0<ba.x||0<ba.width)&&mxUtils.intersects(J,new mxRectangle(V.x+(ba.x-ba.width-1)*p+(0==ba.x?V.width*p:0),V.y,1,V.height))?Y="col-resize":(0<ba.y||0<ba.height)&&mxUtils.intersects(J,new mxRectangle(V.x,V.y+(ba.y-ba.height-1)*p+(0==ba.y?V.height:0),V.width,1))&&(Y="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=Y&&T.setCursor(Y)}}}),mouseUp:mxUtils.bind(this,
+function(J,V){F=D=N=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(J){var V=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);J.view.graph.isHtmlLabel(J.cell)&&(V=1!=J.style.html?mxUtils.htmlEntities(V,!1):Graph.sanitizeHtml(V));return V};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=
+!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(J,V){return!1};this.alternateEdgeStyle="vertical";null==l&&this.loadStylesheet();var R=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var J=R.apply(this,arguments);if(this.graph.pageVisible){var V=[],T=this.graph.pageFormat,ba=this.graph.pageScale,
+Y=T.width*ba;T=T.height*ba;ba=this.graph.view.translate;for(var p=this.graph.view.scale,E=this.graph.getPageLayout(),Q=0;Q<E.width;Q++)V.push(new mxRectangle(((E.x+Q)*Y+ba.x)*p,(E.y*T+ba.y)*p,Y*p,T*p));for(Q=1;Q<E.height;Q++)V.push(new mxRectangle((E.x*Y+ba.x)*p,((E.y+Q)*T+ba.y)*p,Y*p,T*p));J=V.concat(J)}return J};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(J,V){return null==J.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
+function(J){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(J){for(var V=d.apply(this,arguments),T=new mxDictionary,ba=[],Y=0;Y<V.length;Y++){var p=this.graph.isTableCell(J)&&this.graph.isTableCell(V[Y])&&this.graph.isCellSelected(V[Y])?this.graph.model.getParent(V[Y]):this.graph.isTableRow(J)&&this.graph.isTableRow(V[Y])&&
+this.graph.isCellSelected(V[Y])?V[Y]:this.graph.getCompositeParent(V[Y]);null==p||T.get(p)||(T.put(p,!0),ba.push(p))}return ba};var f=this.graphHandler.start;this.graphHandler.start=function(J,V,T,ba){var Y=!1;this.graph.isTableCell(J)&&(this.graph.isCellSelected(J)?Y=!0:J=this.graph.model.getParent(J));Y||this.graph.isTableRow(J)&&this.graph.isCellSelected(J)||(J=this.graph.getCompositeParent(J));f.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(J,V){V=this.graph.getCompositeParent(V);
+return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this);this.getRubberband=function(){return g};var u=(new Date).getTime(),x=0,A=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var J=this.currentState;A.apply(this,arguments);J!=this.currentState?(u=(new Date).getTime(),x=0):x=(new Date).getTime()-u};var H=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(J){return mxEvent.isShiftDown(J.getEvent())&&
+mxEvent.isAltDown(J.getEvent())?!1:null!=this.currentState&&J.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&H.apply(this,arguments)};var P=this.isToggleEvent;this.isToggleEvent=function(J){return P.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J)};var M=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(J){return M.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J.getEvent())||
+mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==J.getState()&&mxEvent.isTouchEvent(J.getEvent())};var G=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(G=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=G)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=
+function(J){return mxEvent.isMouseEvent(J.getEvent())};var ia=this.click;this.click=function(J){var V=null==J.state&&null!=J.sourceState&&this.isCellLocked(J.sourceState.cell);if(this.isEnabled()&&!V||J.isConsumed())return ia.apply(this,arguments);var T=V?J.sourceState.cell:J.getCell();null!=T&&(T=this.getClickableLinkForCell(T),null!=T&&(this.isCustomLink(T)?this.customLinkClicked(T):this.openLink(T)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(J){return J.sourceState};
+var ja=this.tooltipHandler.show;this.tooltipHandler.show=function(){ja.apply(this,arguments);if(null!=this.div)for(var J=this.div.getElementsByTagName("a"),V=0;V<J.length;V++)null!=J[V].getAttribute("href")&&null==J[V].getAttribute("target")&&J[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(J){return J.sourceState};this.getCursorForMouseEvent=function(J){var V=null==J.state&&null!=J.sourceState&&this.isCellLocked(J.sourceState.cell);return this.getCursorForCell(V?
+J.sourceState.cell:J.getCell())};var ha=this.getCursorForCell;this.getCursorForCell=function(J){if(!this.isEnabled()||this.isCellLocked(J)){if(null!=this.getClickableLinkForCell(J))return"pointer";if(this.isCellLocked(J))return"default"}return ha.apply(this,arguments)};this.selectRegion=function(J,V){var T=mxEvent.isAltDown(V)?J:null;J=this.getCells(J.x,J.y,J.width,J.height,null,null,T,function(ba){return"1"==mxUtils.getValue(ba.style,"locked","0")},!0);if(this.isToggleEvent(V))for(T=0;T<J.length;T++)this.selectCellForEvent(J[T],
+V);else this.selectCellsForEvent(J,V);return J};var ca=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(J,V,T){return this.graph.isCellSelected(J)?!1:ca.apply(this,arguments)};this.isCellLocked=function(J){for(;null!=J;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(J),"locked","0"))return!0;J=this.model.getParent(J)}return!1};var oa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,V){"mouseDown"==V.getProperty("eventName")&&
+(J=V.getProperty("event").getState(),oa=null==J||this.isSelectionEmpty()||this.isCellSelected(J.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(J,V){if(!mxEvent.isMultiTouchEvent(V)){J=V.getProperty("event");var T=V.getProperty("cell");null==T?(J=mxUtils.convertPoint(this.container,mxEvent.getClientX(J),mxEvent.getClientY(J)),g.start(J.x,J.y)):null!=oa?this.addSelectionCells(oa):1<this.getSelectionCount()&&this.isCellSelected(T)&&this.removeSelectionCell(T);
+oa=null;V.consume()}}));this.connectionHandler.selectCells=function(J,V){this.graph.setSelectionCell(V||J)};this.connectionHandler.constraintHandler.isStateIgnored=function(J,V){var T=J.view.graph;return V&&(T.isCellSelected(J.cell)||T.isTableRow(J.cell)&&T.selectionCellsHandler.isHandled(T.model.getParent(J.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var J=this.connectionHandler.constraintHandler;null!=J.currentFocus&&J.isStateIgnored(J.currentFocus,!0)&&
+(J.currentFocus=null,J.constraints=null,J.destroyIcons());J.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var sa=this.updateMouseEvent;this.updateMouseEvent=function(J){J=sa.apply(this,arguments);null!=J.state&&this.isCellLocked(J.getCell())&&(J.state=null);return J}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
+Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
+Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");
Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e};
Graph.createSvgImage=function(b,e,k,l,B){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=l&&null!=B?'viewBox="0 0 '+l+" "+B+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,e)};
@@ -2494,11 +2493,11 @@ k));q&&F<N+Graph.minTableColumnWidth&&(k=k.clone(),k.width=N+e.width+e.x+Graph.m
arguments);null!=d&&R&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var K=this.node.getElementsByTagName("path");if(1<K.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&K[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var R=this.state.view.graph.getFlowAnimationStyle();null!=R&&K[1].setAttribute("class",R.getAttribute("id"))}}};var l=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(K,R){return l.apply(this,arguments)||null!=K.routedPoints&&null!=R.routedPoints&&!mxUtils.equalPoints(R.routedPoints,K.routedPoints)};var B=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(K){B.apply(this,arguments);this.graph.model.isEdge(K.cell)&&1!=K.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(K)};mxGraphView.prototype.updateLineJumps=function(K){var R=K.absolutePoints;if(Graph.lineJumpsEnabled){var d=null!=K.routedPoints,f=null;if(null!=R&&null!=this.validEdges&&"none"!==mxUtils.getValue(K.style,"jumpStyle","none")){var g=function(oa,sa,J){var V=new mxPoint(sa,J);V.type=oa;f.push(V);V=null!=K.routedPoints?K.routedPoints[f.length-1]:null;return null==V||V.type!=
-oa||V.x!=sa||V.y!=J},u=.5*this.scale;d=!1;f=[];for(var x=0;x<R.length-1;x++){for(var A=R[x+1],H=R[x],P=[],M=R[x+2];x<R.length-2&&mxUtils.ptSegDistSq(H.x,H.y,M.x,M.y,A.x,A.y)<1*this.scale*this.scale;)A=M,x++,M=R[x+2];d=g(0,H.x,H.y)||d;for(var G=0;G<this.validEdges.length;G++){var ia=this.validEdges[G],ja=ia.absolutePoints;if(null!=ja&&mxUtils.intersects(K,ia)&&"1"!=ia.style.noJump)for(ia=0;ia<ja.length-1;ia++){var ha=ja[ia+1],ba=ja[ia];for(M=ja[ia+2];ia<ja.length-2&&mxUtils.ptSegDistSq(ba.x,ba.y,M.x,
-M.y,ha.x,ha.y)<1*this.scale*this.scale;)ha=M,ia++,M=ja[ia+2];M=mxUtils.intersection(H.x,H.y,A.x,A.y,ba.x,ba.y,ha.x,ha.y);if(null!=M&&(Math.abs(M.x-H.x)>u||Math.abs(M.y-H.y)>u)&&(Math.abs(M.x-A.x)>u||Math.abs(M.y-A.y)>u)&&(Math.abs(M.x-ba.x)>u||Math.abs(M.y-ba.y)>u)&&(Math.abs(M.x-ha.x)>u||Math.abs(M.y-ha.y)>u)){ha=M.x-H.x;ba=M.y-H.y;M={distSq:ha*ha+ba*ba,x:M.x,y:M.y};for(ha=0;ha<P.length;ha++)if(P[ha].distSq>M.distSq){P.splice(ha,0,M);M=null;break}null==M||0!=P.length&&P[P.length-1].x===M.x&&P[P.length-
+oa||V.x!=sa||V.y!=J},u=.5*this.scale;d=!1;f=[];for(var x=0;x<R.length-1;x++){for(var A=R[x+1],H=R[x],P=[],M=R[x+2];x<R.length-2&&mxUtils.ptSegDistSq(H.x,H.y,M.x,M.y,A.x,A.y)<1*this.scale*this.scale;)A=M,x++,M=R[x+2];d=g(0,H.x,H.y)||d;for(var G=0;G<this.validEdges.length;G++){var ia=this.validEdges[G],ja=ia.absolutePoints;if(null!=ja&&mxUtils.intersects(K,ia)&&"1"!=ia.style.noJump)for(ia=0;ia<ja.length-1;ia++){var ha=ja[ia+1],ca=ja[ia];for(M=ja[ia+2];ia<ja.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,M.x,
+M.y,ha.x,ha.y)<1*this.scale*this.scale;)ha=M,ia++,M=ja[ia+2];M=mxUtils.intersection(H.x,H.y,A.x,A.y,ca.x,ca.y,ha.x,ha.y);if(null!=M&&(Math.abs(M.x-H.x)>u||Math.abs(M.y-H.y)>u)&&(Math.abs(M.x-A.x)>u||Math.abs(M.y-A.y)>u)&&(Math.abs(M.x-ca.x)>u||Math.abs(M.y-ca.y)>u)&&(Math.abs(M.x-ha.x)>u||Math.abs(M.y-ha.y)>u)){ha=M.x-H.x;ca=M.y-H.y;M={distSq:ha*ha+ca*ca,x:M.x,y:M.y};for(ha=0;ha<P.length;ha++)if(P[ha].distSq>M.distSq){P.splice(ha,0,M);M=null;break}null==M||0!=P.length&&P[P.length-1].x===M.x&&P[P.length-
1].y===M.y||P.push(M)}}}for(ia=0;ia<P.length;ia++)d=g(1,P[ia].x,P[ia].y)||d}M=R[R.length-1];d=g(0,M.x,M.y)||d}K.routedPoints=f;return d}return!1};var q=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(K,R,d){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)q.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2,g=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,u=mxUtils.getValue(this.style,"jumpStyle","none"),x=!0,A=null,H=null,P=[],M=null;K.begin();for(var G=0;G<this.state.routedPoints.length;G++){var ia=this.state.routedPoints[G],ja=new mxPoint(ia.x/this.scale,ia.y/this.scale);0==G?ja=R[0]:G==this.state.routedPoints.length-1&&(ja=R[R.length-1]);var ha=!1;if(null!=A&&1==ia.type){var ba=this.state.routedPoints[G+1];ia=ba.x/this.scale-
-ja.x;ba=ba.y/this.scale-ja.y;ia=ia*ia+ba*ba;null==M&&(M=new mxPoint(ja.x-A.x,ja.y-A.y),H=Math.sqrt(M.x*M.x+M.y*M.y),0<H?(M.x=M.x*g/H,M.y=M.y*g/H):M=null);ia>g*g&&0<H&&(ia=A.x-ja.x,ba=A.y-ja.y,ia=ia*ia+ba*ba,ia>g*g&&(ha=new mxPoint(ja.x-M.x,ja.y-M.y),ia=new mxPoint(ja.x+M.x,ja.y+M.y),P.push(ha),this.addPoints(K,P,d,f,!1,null,x),P=0>Math.round(M.x)||0==Math.round(M.x)&&0>=Math.round(M.y)?1:-1,x=!1,"sharp"==u?(K.lineTo(ha.x-M.y*P,ha.y+M.x*P),K.lineTo(ia.x-M.y*P,ia.y+M.x*P),K.lineTo(ia.x,ia.y)):"line"==
+mxConstants.LINE_ARCSIZE)/2,g=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,u=mxUtils.getValue(this.style,"jumpStyle","none"),x=!0,A=null,H=null,P=[],M=null;K.begin();for(var G=0;G<this.state.routedPoints.length;G++){var ia=this.state.routedPoints[G],ja=new mxPoint(ia.x/this.scale,ia.y/this.scale);0==G?ja=R[0]:G==this.state.routedPoints.length-1&&(ja=R[R.length-1]);var ha=!1;if(null!=A&&1==ia.type){var ca=this.state.routedPoints[G+1];ia=ca.x/this.scale-
+ja.x;ca=ca.y/this.scale-ja.y;ia=ia*ia+ca*ca;null==M&&(M=new mxPoint(ja.x-A.x,ja.y-A.y),H=Math.sqrt(M.x*M.x+M.y*M.y),0<H?(M.x=M.x*g/H,M.y=M.y*g/H):M=null);ia>g*g&&0<H&&(ia=A.x-ja.x,ca=A.y-ja.y,ia=ia*ia+ca*ca,ia>g*g&&(ha=new mxPoint(ja.x-M.x,ja.y-M.y),ia=new mxPoint(ja.x+M.x,ja.y+M.y),P.push(ha),this.addPoints(K,P,d,f,!1,null,x),P=0>Math.round(M.x)||0==Math.round(M.x)&&0>=Math.round(M.y)?1:-1,x=!1,"sharp"==u?(K.lineTo(ha.x-M.y*P,ha.y+M.x*P),K.lineTo(ia.x-M.y*P,ia.y+M.x*P),K.lineTo(ia.x,ia.y)):"line"==
u?(K.moveTo(ha.x+M.y*P,ha.y-M.x*P),K.lineTo(ha.x-M.y*P,ha.y+M.x*P),K.moveTo(ia.x-M.y*P,ia.y+M.x*P),K.lineTo(ia.x+M.y*P,ia.y-M.x*P),K.moveTo(ia.x,ia.y)):"arc"==u?(P*=1.3,K.curveTo(ha.x-M.y*P,ha.y+M.x*P,ia.x-M.y*P,ia.y+M.x*P,ia.x,ia.y)):(K.moveTo(ia.x,ia.y),x=!0),P=[ia],ha=!0))}else M=null;ha||(P.push(ja),A=ja)}this.addPoints(K,P,d,f,!1,null,x);K.stroke()}};var D=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(K,R,d,f){return null!=R&&"centerPerimeter"==
R.style[mxConstants.STYLE_PERIMETER]?new mxPoint(R.getCenterX(),R.getCenterY()):D.apply(this,arguments)};var N=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(K,R,d,f){if(null==R||null==K||"1"!=R.style.snapToPoint&&"1"!=K.style.snapToPoint)N.apply(this,arguments);else{R=this.getTerminalPort(K,R,f);var g=this.getNextPoint(K,d,f),u=this.graph.isOrthogonal(K),x=mxUtils.toRadians(Number(R.style[mxConstants.STYLE_ROTATION]||"0")),A=new mxPoint(R.getCenterX(),
R.getCenterY());if(0!=x){var H=Math.cos(-x),P=Math.sin(-x);g=mxUtils.getRotatedPoint(g,H,P,A)}H=parseFloat(K.style[mxConstants.STYLE_PERIMETER_SPACING]||0);H+=parseFloat(K.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(R,g,0==x&&u,H);0!=x&&(H=Math.cos(x),P=Math.sin(x),g=mxUtils.getRotatedPoint(g,H,P,A));K.setAbsoluteTerminalPoint(this.snapToAnchorPoint(K,R,d,f,g),f)}};mxGraphView.prototype.snapToAnchorPoint=function(K,R,
@@ -2615,46 +2614,46 @@ O=this.graph.getModel().getParent(y);var U=this.graph.getCellGeometry(y);if(this
na=na.nextSibling;return ea}function O(aa,ea){if(null!=aa)if(ea.originalNode!=aa)U(aa);else for(aa=aa.firstChild,ea=ea.firstChild;null!=aa;){var na=aa.nextSibling;null==ea?U(aa):(O(aa,ea),ea=ea.nextSibling);aa=na}}function U(aa){for(var ea=aa.firstChild;null!=ea;){var na=ea.nextSibling;U(ea);ea=na}1==aa.nodeType&&("BR"===aa.nodeName||null!=aa.firstChild)||3==aa.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(aa)).length?(3==aa.nodeType&&mxUtils.setTextContent(aa,mxUtils.getTextContent(aa).replace(/\n|\r/g,
"")),1==aa.nodeType&&(aa.removeAttribute("style"),aa.removeAttribute("class"),aa.removeAttribute("width"),aa.removeAttribute("cellpadding"),aa.removeAttribute("cellspacing"),aa.removeAttribute("border"))):aa.parentNode.removeChild(aa)}A.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(aa){var ea=L(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&
(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?O(this.textarea,ea):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var y=this.graph.view.getState(this.editingCell);if(null!=y){var L=null!=y&&"0"!=mxUtils.getValue(y.style,"nl2Br","1"),O=this.saveSelection();if(this.codeViewMode){va=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<va.length&&"\n"==va.charAt(va.length-
-1)&&(va=va.substring(0,va.length-1));va=this.graph.sanitizeHtml(L?va.replace(/\n/g,"<br/>"):va,!0);this.textarea.className="mxCellEditor geContentEditable";ua=mxUtils.getValue(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var U=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),aa=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,
+1)&&(va=va.substring(0,va.length-1));va=Graph.sanitizeHtml(L?va.replace(/\n/g,"<br/>"):va,!0);this.textarea.className="mxCellEditor geContentEditable";ua=mxUtils.getValue(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);L=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var U=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),aa=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,
ea=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,na=[];(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&na.push("underline");(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&na.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ua*mxConstants.LINE_HEIGHT)+"px":
mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ua)+"px";this.textarea.style.textDecoration=na.join(" ");this.textarea.style.fontWeight=aa?"bold":"normal";this.textarea.style.fontStyle=ea?"italic":"";this.textarea.style.fontFamily=L;this.textarea.style.textAlign=U;this.textarea.style.padding="0px";this.textarea.innerHTML!=va&&(this.textarea.innerHTML=va,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));
-this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var va=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(va=mxUtils.replaceTrailingNewlines(va,"<div><br></div>"));va=this.graph.sanitizeHtml(L?va.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):va,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ua=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=
-mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ua*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ua)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=va&&(this.textarea.innerHTML=va);this.codeViewMode=!0}this.textarea.focus();
-null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=O;this.resize()}};var H=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(y,L){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=y){var O=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*O;this.bounds.height=60*O;var U=null!=y.text?y.text.margin:null;
-null==U&&(U=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+=U.x*this.bounds.width;this.bounds.y+=U.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/O)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/O)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&
-(this.textarea.style.height=Math.round(this.bounds.height/O)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*O);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/O)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*O);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+
-"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+O+","+O+")")}else this.textarea.style.height="",this.textarea.style.overflow="",H.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,L){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var O=this.graph.getEditingValue(y.cell,L);"1"==mxUtils.getValue(y.style,"nl2Br","1")&&(O=O.replace(/\n/g,
-"<br/>"));return O=this.graph.sanitizeHtml(O,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(y){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return L="1"==mxUtils.getValue(y.style,"nl2Br","1")?L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):L.replace(/\r\n/g,"").replace(/\n/g,"")};var P=mxCellEditor.prototype.stopEditing;
-mxCellEditor.prototype.stopEditing=function(y){this.codeViewMode&&this.toggleViewMode();P.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};var M=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,L){this.graph.getModel().beginUpdate();try{M.apply(this,arguments),""==L&&this.graph.isCellDeletable(y.cell)&&0==this.graph.model.getChildCount(y.cell)&&this.graph.isTransparentState(y)&&
-this.graph.removeCells([y.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(y){var L=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(y.style,mxConstants.STYLE_FILLCOLOR,null));L==mxConstants.NONE&&(L=null);
-return L};mxCellEditor.prototype.getBorderColor=function(y){var L=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(y.style,mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize=function(y){var L=this.graph.getView().scale;
-return new mxRectangle(0,0,null==y.text?30:y.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(y,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.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 L=this.graph.view.translate,O=this.graph.view.scale;y=this.roundLength((this.bounds.x+this.currentDx)/O-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/O-L.y);O=this.graph.view.unit;this.hint.innerHTML=e(y,O)+", "+e(L,O);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=
-function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var G=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(y,L){G.apply(this,arguments);var O=this.graph.getCellStyle(y);if(null==O.childLayout){var U=this.graph.model.getParent(y),aa=null!=U?this.graph.getCellGeometry(U):null;if(null!=aa&&(O=this.graph.getCellStyle(U),"stackLayout"==O.childLayout)){var ea=parseFloat(mxUtils.getValue(O,"stackBorder",mxStackLayout.prototype.border));
-O="1"==mxUtils.getValue(O,"horizontalStack","1");var na=this.graph.getActualStartSize(U);aa=aa.clone();O?aa.height=L.height+na.y+na.height+2*ea:aa.width=L.width+na.x+na.width+2*ea;this.graph.model.setGeometry(U,aa)}}};var ia=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function y(va){O.get(va)||(O.put(va,!0),aa.push(va))}for(var L=ia.apply(this,arguments),O=new mxDictionary,U=this.graph.model,aa=[],ea=0;ea<L.length;ea++){var na=
-L[ea];this.graph.isTableCell(na)?y(U.getParent(U.getParent(na))):this.graph.isTableRow(na)&&y(U.getParent(na));y(na)}return aa};var ja=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var L=ja.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(y){var L=ha.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=
-1;return L};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,L){return this.graph.isRecursiveVertexResize(y)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(y,L){return mxEvent.isControlDown(L.getEvent())||
-mxEvent.isMetaDown(L.getEvent())};var ba=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):
-this.bounds};var oa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return oa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var sa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||sa.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 J=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,T=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var y=T.apply(this,arguments);
-if(this.graph.isTable(this.state.cell)){var L=function(Ja,Ia,Pa){for(var Qa=[],ab=0;ab<Ja.length;ab++){var db=Ja[ab];Qa.push(null==db?null:new mxPoint((ua+db.x+Ia)*ea,(xa+db.y+Pa)*ea))}return Qa},O=this,U=this.graph,aa=U.model,ea=U.view.scale,na=this.state,va=this.selectionBorder,ua=this.state.origin.x+U.view.translate.x,xa=this.state.origin.y+U.view.translate.y;null==y&&(y=[]);var Ca=U.view.getCellStates(aa.getChildCells(this.state.cell,!0));if(0<Ca.length){var La=aa.getChildCells(Ca[0].cell,!0),
-Sa=U.getTableLines(this.state.cell,!1,!0),Ta=U.getTableLines(this.state.cell,!0,!1);for(aa=0;aa<Ca.length;aa++)mxUtils.bind(this,function(Ja){var Ia=Ca[Ja],Pa=Ja<Ca.length-1?Ca[Ja+1]:null;Pa=null!=Pa?U.getCellGeometry(Pa.cell):null;var Qa=null!=Pa&&null!=Pa.alternateBounds?Pa.alternateBounds:Pa;Pa=null!=Ta[Ja]?new V(Ta[Ja],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Pa.isDashed=va.isDashed;Pa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Pa);Ia.tableHandle=!0;
-var ab=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==ab?mxConstants.NONE:va.stroke;if(this.shape.constructor==V)this.shape.line=L(Ta[Ja],0,ab),this.shape.updateBoundsFromLine();else{var Ya=U.getActualStartSize(na.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+ab*ea;this.shape.bounds.x=na.x+(Ja==Ca.length-1?0:Ya.x*ea);this.shape.bounds.width=na.width-(Ja==
-Ca.length-1?0:Ya.width+Ya.x+ea)}this.shape.redraw()}};var db=!1;Ia.setPosition=function(Ya,jb,nb){ab=Math.max(Graph.minTableRowHeight-Ya.height,jb.y-Ya.y-Ya.height);db=mxEvent.isShiftDown(nb.getEvent());null!=Qa&&db&&(ab=Math.min(ab,Qa.height-Graph.minTableRowHeight))};Ia.execute=function(Ya){if(0!=ab)U.setTableRowHeight(this.state.cell,ab,!db);else if(!O.blockDelayedSelection){var jb=U.getCellAt(Ya.getGraphX(),Ya.getGraphY())||na.cell;U.graphHandler.selectCellForEvent(jb,Ya)}ab=0};Ia.reset=function(){ab=
-0};y.push(Ia)})(aa);for(aa=0;aa<La.length;aa++)mxUtils.bind(this,function(Ja){var Ia=U.view.getState(La[Ja]),Pa=U.getCellGeometry(La[Ja]),Qa=null!=Pa.alternateBounds?Pa.alternateBounds:Pa;null==Ia&&(Ia=new mxCellState(U.view,La[Ja],U.getCellStyle(La[Ja])),Ia.x=na.x+Pa.x*ea,Ia.y=na.y+Pa.y*ea,Ia.width=Qa.width*ea,Ia.height=Qa.height*ea,Ia.updateCachedBounds());Pa=Ja<La.length-1?La[Ja+1]:null;Pa=null!=Pa?U.getCellGeometry(Pa):null;var ab=null!=Pa&&null!=Pa.alternateBounds?Pa.alternateBounds:Pa;Pa=null!=
-Sa[Ja]?new V(Sa[Ja],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Pa.isDashed=va.isDashed;Pa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"col-resize",null,Pa);Ia.tableHandle=!0;var db=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==db?mxConstants.NONE:va.stroke;if(this.shape.constructor==V)this.shape.line=L(Sa[Ja],db,0),this.shape.updateBoundsFromLine();else{var jb=U.getActualStartSize(na.cell,
-!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Qa.width+db)*ea;this.shape.bounds.y=na.y+(Ja==La.length-1?0:jb.y*ea);this.shape.bounds.height=na.height-(Ja==La.length-1?0:(jb.height+jb.y)*ea)}this.shape.redraw()}};var Ya=!1;Ia.setPosition=function(jb,nb,vb){db=Math.max(Graph.minTableColumnWidth-Qa.width,nb.x-jb.x-Qa.width);Ya=mxEvent.isShiftDown(vb.getEvent());null==ab||Ya||(db=Math.min(db,ab.width-Graph.minTableColumnWidth))};Ia.execute=function(jb){if(0!=db)U.setTableColumnWidth(this.state.cell,
-db,Ya);else if(!O.blockDelayedSelection){var nb=U.getCellAt(jb.getGraphX(),jb.getGraphY())||na.cell;U.graphHandler.selectCellForEvent(nb,jb)}db=0};Ia.positionChanged=function(){};Ia.reset=function(){db=0};y.push(Ia)})(aa)}}return null!=y?y.reverse():null};var ca=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(y){ca.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=y?"":"hidden";
-if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var y=this.graph.model;if(null!=this.moveHandles){for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].parentNode.removeChild(this.moveHandles[L]);this.moveHandles=null}this.moveHandles=[];for(L=0;L<y.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(O){if(null!=O&&y.isVertex(O.cell)){var U=mxUtils.createImage(Editor.rowMoveImage);
-U.style.position="absolute";U.style.cursor="pointer";U.style.width="7px";U.style.height="4px";U.style.padding="4px 2px 4px 2px";U.rowState=O;mxEvent.addGestureListeners(U,mxUtils.bind(this,function(aa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(aa)&&this.graph.isCellSelected(O.cell)||this.graph.selectCellForEvent(O.cell,aa);mxEvent.isPopupTrigger(aa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(aa),mxEvent.getClientY(aa),this.graph.getSelectionCells()),
-this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(aa),this.graph.isMouseDown=!0);mxEvent.consume(aa)}),null,mxUtils.bind(this,function(aa){mxEvent.isPopupTrigger(aa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(aa),mxEvent.getClientY(aa),O.cell,aa),mxEvent.consume(aa))}));this.moveHandles.push(U);this.graph.container.appendChild(U)}})(this.graph.view.getState(y.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var y=
-0;y<this.customHandles.length;y++)this.customHandles[y].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var Y=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=new mxPoint(0,0),L=this.tolerance,O=this.state.style.shape;null==mxCellRenderer.defaultShapes[O]&&mxStencilRegistry.getStencil(O);O=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
-if(!O&&null!=this.customHandles)for(var U=0;U<this.customHandles.length;U++)if(null!=this.customHandles[U].shape&&null!=this.customHandles[U].shape.bounds){var aa=this.customHandles[U].shape.bounds,ea=aa.getCenterX(),na=aa.getCenterY();if(Math.abs(this.state.x-ea)<aa.width/2||Math.abs(this.state.y-na)<aa.height/2||Math.abs(this.state.x+this.state.width-ea)<aa.width/2||Math.abs(this.state.y+this.state.height-na)<aa.height/2){O=!0;break}}O&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?
-(L/=2,this.graph.isTable(this.state.cell)&&(L+=7),y.x=this.sizers[0].bounds.width+L,y.y=this.sizers[0].bounds.height+L):y=Y.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 L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/
-y),L)+" x "+e(this.roundLength(this.bounds.height/y),L)}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 p=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(y,L){p.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 E=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(y,L){E.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
-"")};mxEdgeHandler.prototype.updateHint=function(y,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var O=this.graph.view.translate,U=this.graph.view.scale,aa=this.roundLength(L.x/U-O.x);O=this.roundLength(L.y/U-O.y);U=this.graph.view.unit;this.hint.innerHTML=e(aa,U)+", "+e(O,U);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(aa=this.constraintHandler.currentConstraint.point,
-this.hint.innerHTML="["+Math.round(100*aa.x)+"%, "+Math.round(100*aa.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(),L.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
+this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var va=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(va=mxUtils.replaceTrailingNewlines(va,"<div><br></div>"));va=Graph.sanitizeHtml(L?va.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):va,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ua=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(ua*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ua)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=va&&(this.textarea.innerHTML=va);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&
+this.restoreSelection(this.switchSelectionState);this.switchSelectionState=O;this.resize()}};var H=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(y,L){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=y){var O=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*O;this.bounds.height=60*O;var U=null!=y.text?y.text.margin:null;null==U&&(U=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+=U.x*this.bounds.width;this.bounds.y+=U.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/O)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/O)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/O)+(this.textarea.offsetHeight-
+this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*O);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/O)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*O);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+O+","+
+O+")")}else this.textarea.style.height="",this.textarea.style.overflow="",H.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,L){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var O=this.graph.getEditingValue(y.cell,L);"1"==mxUtils.getValue(y.style,"nl2Br","1")&&(O=O.replace(/\n/g,"<br/>"));return O=Graph.sanitizeHtml(O,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;
+mxCellEditor.prototype.getCurrentValue=function(y){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var L=Graph.sanitizeHtml(this.textarea.innerHTML,!0);return L="1"==mxUtils.getValue(y.style,"nl2Br","1")?L.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):L.replace(/\r\n/g,"").replace(/\n/g,"")};var P=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(y){this.codeViewMode&&this.toggleViewMode();P.apply(this,arguments);
+this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};var M=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,L){this.graph.getModel().beginUpdate();try{M.apply(this,arguments),""==L&&this.graph.isCellDeletable(y.cell)&&0==this.graph.model.getChildCount(y.cell)&&this.graph.isTransparentState(y)&&this.graph.removeCells([y.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
+function(y){var L=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=L&&L!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(y.style,mxConstants.STYLE_FILLCOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getBorderColor=function(y){var L=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BORDERCOLOR,
+null);null!=L&&L!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(y.style,mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize=function(y){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==y.text?30:y.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;
+mxGraphHandler.prototype.isValidDropTarget=function(y,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.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 L=this.graph.view.translate,O=this.graph.view.scale;y=this.roundLength((this.bounds.x+
+this.currentDx)/O-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/O-L.y);O=this.graph.view.unit;this.hint.innerHTML=e(y,O)+", "+e(L,O);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var G=mxStackLayout.prototype.resizeCell;
+mxStackLayout.prototype.resizeCell=function(y,L){G.apply(this,arguments);var O=this.graph.getCellStyle(y);if(null==O.childLayout){var U=this.graph.model.getParent(y),aa=null!=U?this.graph.getCellGeometry(U):null;if(null!=aa&&(O=this.graph.getCellStyle(U),"stackLayout"==O.childLayout)){var ea=parseFloat(mxUtils.getValue(O,"stackBorder",mxStackLayout.prototype.border));O="1"==mxUtils.getValue(O,"horizontalStack","1");var na=this.graph.getActualStartSize(U);aa=aa.clone();O?aa.height=L.height+na.y+na.height+
+2*ea:aa.width=L.width+na.x+na.width+2*ea;this.graph.model.setGeometry(U,aa)}}};var ia=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function y(va){O.get(va)||(O.put(va,!0),aa.push(va))}for(var L=ia.apply(this,arguments),O=new mxDictionary,U=this.graph.model,aa=[],ea=0;ea<L.length;ea++){var na=L[ea];this.graph.isTableCell(na)?y(U.getParent(U.getParent(na))):this.graph.isTableRow(na)&&y(U.getParent(na));y(na)}return aa};
+var ja=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var L=ja.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(y){var L=ha.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};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,L){return this.graph.isRecursiveVertexResize(y)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(y,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var ca=mxVertexHandler.prototype.isRotationHandleVisible;
+mxVertexHandler.prototype.isRotationHandleVisible=function(){return ca.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var oa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
+function(){return oa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var sa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||sa.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 J=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,T=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var y=T.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Ja,Ia,Pa){for(var Qa=[],ab=0;ab<Ja.length;ab++){var db=
+Ja[ab];Qa.push(null==db?null:new mxPoint((ua+db.x+Ia)*ea,(xa+db.y+Pa)*ea))}return Qa},O=this,U=this.graph,aa=U.model,ea=U.view.scale,na=this.state,va=this.selectionBorder,ua=this.state.origin.x+U.view.translate.x,xa=this.state.origin.y+U.view.translate.y;null==y&&(y=[]);var Ca=U.view.getCellStates(aa.getChildCells(this.state.cell,!0));if(0<Ca.length){var La=aa.getChildCells(Ca[0].cell,!0),Sa=U.getTableLines(this.state.cell,!1,!0),Ta=U.getTableLines(this.state.cell,!0,!1);for(aa=0;aa<Ca.length;aa++)mxUtils.bind(this,
+function(Ja){var Ia=Ca[Ja],Pa=Ja<Ca.length-1?Ca[Ja+1]:null;Pa=null!=Pa?U.getCellGeometry(Pa.cell):null;var Qa=null!=Pa&&null!=Pa.alternateBounds?Pa.alternateBounds:Pa;Pa=null!=Ta[Ja]?new V(Ta[Ja],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Pa.isDashed=va.isDashed;Pa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Pa);Ia.tableHandle=!0;var ab=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=
+this.shape){this.shape.stroke=0==ab?mxConstants.NONE:va.stroke;if(this.shape.constructor==V)this.shape.line=L(Ta[Ja],0,ab),this.shape.updateBoundsFromLine();else{var Ya=U.getActualStartSize(na.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+ab*ea;this.shape.bounds.x=na.x+(Ja==Ca.length-1?0:Ya.x*ea);this.shape.bounds.width=na.width-(Ja==Ca.length-1?0:Ya.width+Ya.x+ea)}this.shape.redraw()}};var db=!1;Ia.setPosition=function(Ya,jb,nb){ab=Math.max(Graph.minTableRowHeight-
+Ya.height,jb.y-Ya.y-Ya.height);db=mxEvent.isShiftDown(nb.getEvent());null!=Qa&&db&&(ab=Math.min(ab,Qa.height-Graph.minTableRowHeight))};Ia.execute=function(Ya){if(0!=ab)U.setTableRowHeight(this.state.cell,ab,!db);else if(!O.blockDelayedSelection){var jb=U.getCellAt(Ya.getGraphX(),Ya.getGraphY())||na.cell;U.graphHandler.selectCellForEvent(jb,Ya)}ab=0};Ia.reset=function(){ab=0};y.push(Ia)})(aa);for(aa=0;aa<La.length;aa++)mxUtils.bind(this,function(Ja){var Ia=U.view.getState(La[Ja]),Pa=U.getCellGeometry(La[Ja]),
+Qa=null!=Pa.alternateBounds?Pa.alternateBounds:Pa;null==Ia&&(Ia=new mxCellState(U.view,La[Ja],U.getCellStyle(La[Ja])),Ia.x=na.x+Pa.x*ea,Ia.y=na.y+Pa.y*ea,Ia.width=Qa.width*ea,Ia.height=Qa.height*ea,Ia.updateCachedBounds());Pa=Ja<La.length-1?La[Ja+1]:null;Pa=null!=Pa?U.getCellGeometry(Pa):null;var ab=null!=Pa&&null!=Pa.alternateBounds?Pa.alternateBounds:Pa;Pa=null!=Sa[Ja]?new V(Sa[Ja],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Pa.isDashed=va.isDashed;Pa.svgStrokeTolerance++;
+Ia=new mxHandle(Ia,"col-resize",null,Pa);Ia.tableHandle=!0;var db=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==db?mxConstants.NONE:va.stroke;if(this.shape.constructor==V)this.shape.line=L(Sa[Ja],db,0),this.shape.updateBoundsFromLine();else{var jb=U.getActualStartSize(na.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Qa.width+db)*ea;this.shape.bounds.y=na.y+(Ja==La.length-
+1?0:jb.y*ea);this.shape.bounds.height=na.height-(Ja==La.length-1?0:(jb.height+jb.y)*ea)}this.shape.redraw()}};var Ya=!1;Ia.setPosition=function(jb,nb,vb){db=Math.max(Graph.minTableColumnWidth-Qa.width,nb.x-jb.x-Qa.width);Ya=mxEvent.isShiftDown(vb.getEvent());null==ab||Ya||(db=Math.min(db,ab.width-Graph.minTableColumnWidth))};Ia.execute=function(jb){if(0!=db)U.setTableColumnWidth(this.state.cell,db,Ya);else if(!O.blockDelayedSelection){var nb=U.getCellAt(jb.getGraphX(),jb.getGraphY())||na.cell;U.graphHandler.selectCellForEvent(nb,
+jb)}db=0};Ia.positionChanged=function(){};Ia.reset=function(){db=0};y.push(Ia)})(aa)}}return null!=y?y.reverse():null};var ba=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(y){ba.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=y?"":"hidden";if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
+function(){var y=this.graph.model;if(null!=this.moveHandles){for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].parentNode.removeChild(this.moveHandles[L]);this.moveHandles=null}this.moveHandles=[];for(L=0;L<y.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(O){if(null!=O&&y.isVertex(O.cell)){var U=mxUtils.createImage(Editor.rowMoveImage);U.style.position="absolute";U.style.cursor="pointer";U.style.width="7px";U.style.height="4px";U.style.padding="4px 2px 4px 2px";U.rowState=
+O;mxEvent.addGestureListeners(U,mxUtils.bind(this,function(aa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(aa)&&this.graph.isCellSelected(O.cell)||this.graph.selectCellForEvent(O.cell,aa);mxEvent.isPopupTrigger(aa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(aa),mxEvent.getClientY(aa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(aa),this.graph.isMouseDown=
+!0);mxEvent.consume(aa)}),null,mxUtils.bind(this,function(aa){mxEvent.isPopupTrigger(aa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(aa),mxEvent.getClientY(aa),O.cell,aa),mxEvent.consume(aa))}));this.moveHandles.push(U);this.graph.container.appendChild(U)}})(this.graph.view.getState(y.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var y=0;y<this.customHandles.length;y++)this.customHandles[y].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&
+this.refreshMoveHandles()};var Y=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=new mxPoint(0,0),L=this.tolerance,O=this.state.style.shape;null==mxCellRenderer.defaultShapes[O]&&mxStencilRegistry.getStencil(O);O=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!O&&null!=this.customHandles)for(var U=0;U<this.customHandles.length;U++)if(null!=this.customHandles[U].shape&&null!=this.customHandles[U].shape.bounds){var aa=
+this.customHandles[U].shape.bounds,ea=aa.getCenterX(),na=aa.getCenterY();if(Math.abs(this.state.x-ea)<aa.width/2||Math.abs(this.state.y-na)<aa.height/2||Math.abs(this.state.x+this.state.width-ea)<aa.width/2||Math.abs(this.state.y+this.state.height-na)<aa.height/2){O=!0;break}}O&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=2,this.graph.isTable(this.state.cell)&&(L+=7),y.x=this.sizers[0].bounds.width+L,y.y=this.sizers[0].bounds.height+L):y=Y.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 L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/y),L)+" x "+e(this.roundLength(this.bounds.height/y),L)}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 p=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(y,L){p.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 E=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(y,L){E.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(y,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var O=
+this.graph.view.translate,U=this.graph.view.scale,aa=this.roundLength(L.x/U-O.x);O=this.roundLength(L.y/U-O.y);U=this.graph.view.unit;this.hint.innerHTML=e(aa,U)+", "+e(O,U);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(aa=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*aa.x)+"%, "+Math.round(100*aa.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(),L.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+
@@ -2701,7 +2700,7 @@ Math.round(y.y+y.height+Editor.hintOffset)+"px"}};var cb=mxEdgeHandler.prototype
this.changeHandler=null)}}();(function(){function b(c,m,v){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function l(){mxCylinder.call(this)}function B(){mxCylinder.call(this)}function q(){mxActor.call(this)}function D(){mxCylinder.call(this)}function N(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function K(){mxShape.call(this)}function R(){mxShape.call(this)}
function d(c,m,v,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=v;this.strokewidth=null!=n?n:1}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function x(){mxActor.call(this)}function A(){mxActor.call(this)}function H(){mxActor.call(this)}function P(){mxActor.call(this)}function M(){mxActor.call(this)}function G(){mxActor.call(this)}function ia(){mxActor.call(this)}function ja(c,m){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
this.defaultVariation=m;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ja.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ja.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ja.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ja.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,ja.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ja.prototype.arcTo)}function ha(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function oa(){mxActor.call(this)}function sa(){mxActor.call(this)}function J(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function T(){mxRectangleShape.call(this)}function ca(){mxCylinder.call(this)}function Y(){mxShape.call(this)}function p(){mxShape.call(this)}function E(){mxEllipse.call(this)}function Q(){mxShape.call(this)}
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ja.prototype.arcTo)}function ha(){mxRectangleShape.call(this)}function ca(){mxRectangleShape.call(this)}function oa(){mxActor.call(this)}function sa(){mxActor.call(this)}function J(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function T(){mxRectangleShape.call(this)}function ba(){mxCylinder.call(this)}function Y(){mxShape.call(this)}function p(){mxShape.call(this)}function E(){mxEllipse.call(this)}function Q(){mxShape.call(this)}
function Z(){mxShape.call(this)}function W(){mxRectangleShape.call(this)}function X(){mxShape.call(this)}function da(){mxShape.call(this)}function la(){mxShape.call(this)}function pa(){mxShape.call(this)}function ma(){mxShape.call(this)}function qa(){mxCylinder.call(this)}function za(){mxCylinder.call(this)}function ya(){mxRectangleShape.call(this)}function ra(){mxDoubleEllipse.call(this)}function ta(){mxDoubleEllipse.call(this)}function Aa(){mxArrowConnector.call(this);this.spacing=0}function Oa(){mxArrowConnector.call(this);
this.spacing=0}function Ka(){mxActor.call(this)}function Ma(){mxRectangleShape.call(this)}function Ga(){mxActor.call(this)}function Ba(){mxActor.call(this)}function cb(){mxActor.call(this)}function Na(){mxActor.call(this)}function y(){mxActor.call(this)}function L(){mxActor.call(this)}function O(){mxActor.call(this)}function U(){mxActor.call(this)}function aa(){mxActor.call(this)}function ea(){mxActor.call(this)}function na(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}
function xa(){mxRhombus.call(this)}function Ca(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Sa(){mxEllipse.call(this)}function Ta(){mxEllipse.call(this)}function Ja(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Qa(c,m,v,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function ab(){mxConnector.call(this)}
@@ -2751,7 +2750,7 @@ mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==
z,t*z)),c.moveTo(m+z,v),c.lineTo(m+n-z,v),c.quadTo(m+n,v,m+n,v+z),c.lineTo(m+n,v+t-z),c.quadTo(m+n,v+t,m+n-z,v+t),c.lineTo(m+z,v+t),c.quadTo(m,v+t,m,v+t-z),c.lineTo(m,v+z),c.quadTo(m,v,m+z,v)):(c.moveTo(m,v),c.lineTo(m+n,v),c.lineTo(m+n,v+t),c.lineTo(m,v+t),c.lineTo(m,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ha,mxRectangleShape);ha.prototype.size=.1;ha.prototype.fixedSize=!1;ha.prototype.isHtmlAllowed=function(){return!1};ha.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var m=c.width,v=c.height;c=new mxRectangle(c.x,c.y,m,v);var n=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(m*t,v*t))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
ha.prototype.paintForeground=function(c,m,v,n,t){var z=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),C=parseFloat(mxUtils.getValue(this.style,"size",this.size));C=z?Math.max(0,Math.min(n,C)):n*Math.max(0,Math.min(1,C));this.isRounded&&(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,C=Math.max(C,Math.min(n*z,t*z)));C=Math.round(C);c.begin();c.moveTo(m+C,v);c.lineTo(m+C,v+t);c.moveTo(m+n-C,v);c.lineTo(m+n-C,v+t);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ha);mxCellRenderer.registerShape("process2",ha);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(c,m,v,n,t){c.setFillColor(mxConstants.NONE);c.rect(m,v,n,t);c.fill()};ba.prototype.paintForeground=function(c,m,v,n,t){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(oa,mxHexagon);oa.prototype.size=30;oa.prototype.position=.5;oa.prototype.position2=.5;oa.prototype.base=20;oa.prototype.getLabelMargins=function(){return new mxRectangle(0,
+arguments)};mxCellRenderer.registerShape("process",ha);mxCellRenderer.registerShape("process2",ha);mxUtils.extend(ca,mxRectangleShape);ca.prototype.paintBackground=function(c,m,v,n,t){c.setFillColor(mxConstants.NONE);c.rect(m,v,n,t);c.fill()};ca.prototype.paintForeground=function(c,m,v,n,t){};mxCellRenderer.registerShape("transparent",ca);mxUtils.extend(oa,mxHexagon);oa.prototype.size=30;oa.prototype.position=.5;oa.prototype.position2=.5;oa.prototype.base=20;oa.prototype.getLabelMargins=function(){return new mxRectangle(0,
0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};oa.prototype.isRoundable=function(){return!0};oa.prototype.redrawPath=function(c,m,v,n,t){m=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var z=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),C=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
this.position2)))),fa=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,t-v),new mxPoint(Math.min(n,z+fa),t-v),new mxPoint(C,t),new mxPoint(Math.max(0,z),t-v),new mxPoint(0,t-v)],this.isRounded,m,!0,[4])};mxCellRenderer.registerShape("callout",oa);mxUtils.extend(sa,mxActor);sa.prototype.size=.2;sa.prototype.fixedSize=20;sa.prototype.isRoundable=function(){return!0};sa.prototype.redrawPath=function(c,
m,v,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-m,0),new mxPoint(n,t/2),new mxPoint(n-m,t),new mxPoint(0,t),new mxPoint(m,t/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
@@ -2761,7 +2760,7 @@ V);var fb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBound
0);m+=z;v+=z;n-=2*z;t-=2*z;0<n&&0<t&&(c.setShadow(!1),fb.apply(this,[c,m,v,n,t]))}};mxUtils.extend(T,mxRectangleShape);T.prototype.isHtmlAllowed=function(){return!1};T.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};T.prototype.paintForeground=function(c,m,v,n,t){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var z=
Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);m+=z;v+=z;n-=2*z;t-=2*z;0<n&&0<t&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);z=0;do{var C=mxCellRenderer.defaultShapes[this.style["symbol"+z]];if(null!=C){var fa=this.style["symbol"+z+"Align"],I=this.style["symbol"+z+"VerticalAlign"],wa=this.style["symbol"+z+"Width"],ka=this.style["symbol"+z+"Height"],Xa=this.style["symbol"+z+"Spacing"]||0,kb=this.style["symbol"+z+"VSpacing"]||
Xa,$a=this.style["symbol"+z+"ArcSpacing"];null!=$a&&($a*=this.getArcSize(n+this.strokewidth,t+this.strokewidth),Xa+=$a,kb+=$a);$a=m;var Da=v;$a=fa==mxConstants.ALIGN_CENTER?$a+(n-wa)/2:fa==mxConstants.ALIGN_RIGHT?$a+(n-wa-Xa):$a+Xa;Da=I==mxConstants.ALIGN_MIDDLE?Da+(t-ka)/2:I==mxConstants.ALIGN_BOTTOM?Da+(t-ka-kb):Da+kb;c.save();fa=new C;fa.style=this.style;C.prototype.paintVertexShape.call(fa,c,$a,Da,wa,ka);c.restore()}z++}while(null!=C)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",T);mxUtils.extend(ca,mxCylinder);ca.prototype.redrawPath=function(c,m,v,n,t,z){z?(c.moveTo(0,0),c.lineTo(n/2,t/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(0,t),c.close())};mxCellRenderer.registerShape("message",ca);mxUtils.extend(Y,mxShape);Y.prototype.paintBackground=function(c,m,v,n,t){c.translate(m,v);c.ellipse(n/4,0,n/2,t/4);c.fillAndStroke();c.begin();c.moveTo(n/2,t/4);c.lineTo(n/2,2*t/3);c.moveTo(n/2,t/3);c.lineTo(0,t/3);c.moveTo(n/
+mxCellRenderer.registerShape("ext",T);mxUtils.extend(ba,mxCylinder);ba.prototype.redrawPath=function(c,m,v,n,t,z){z?(c.moveTo(0,0),c.lineTo(n/2,t/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(0,t),c.close())};mxCellRenderer.registerShape("message",ba);mxUtils.extend(Y,mxShape);Y.prototype.paintBackground=function(c,m,v,n,t){c.translate(m,v);c.ellipse(n/4,0,n/2,t/4);c.fillAndStroke();c.begin();c.moveTo(n/2,t/4);c.lineTo(n/2,2*t/3);c.moveTo(n/2,t/3);c.lineTo(0,t/3);c.moveTo(n/
2,t/3);c.lineTo(n,t/3);c.moveTo(n/2,2*t/3);c.lineTo(0,t);c.moveTo(n/2,2*t/3);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",Y);mxUtils.extend(p,mxShape);p.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};p.prototype.paintBackground=function(c,m,v,n,t){c.translate(m,v);c.begin();c.moveTo(0,t/4);c.lineTo(0,3*t/4);c.end();c.stroke();c.begin();c.moveTo(0,t/2);c.lineTo(n/6,t/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,t);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
p);mxUtils.extend(E,mxEllipse);E.prototype.paintVertexShape=function(c,m,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+n/8,v+t);c.lineTo(m+7*n/8,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",E);mxUtils.extend(Q,mxShape);Q.prototype.paintVertexShape=function(c,m,v,n,t){c.translate(m,v);c.begin();c.moveTo(n,0);c.lineTo(0,t);c.moveTo(0,0);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",Q);mxUtils.extend(Z,mxShape);
Z.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Z.prototype.paintBackground=function(c,m,v,n,t){c.translate(m,v);c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,t/8,n,7*t/8);c.fillAndStroke()};Z.prototype.paintForeground=function(c,m,v,n,t){c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,t/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Z);mxUtils.extend(W,mxRectangleShape);W.prototype.size=
@@ -2992,8 +2991,8 @@ function(F,K,R){F=mxUtils.trim(F);if(0<F.length){var d=null,f=q.getLinkTitle(F);
K.geometry.x=d.x;K.geometry.y=d.y;q.setAttributeForCell(K,"linkTarget",R);q.setLinkForCell(K,F);q.cellSizeUpdated(K,!0);q.getModel().beginUpdate();try{K=q.addCell(K),q.fireEvent(new mxEventObject("cellsInserted","cells",[K]))}finally{q.getModel().endUpdate()}q.setSelectionCell(K);q.scrollCellToVisible(q.getSelectionCell())}},!0)})).isEnabled=D;this.addAction("link...",mxUtils.bind(this,function(){if(q.isEnabled())if(q.cellEditor.isContentEditing()){var F=q.getSelectedElement(),K=q.getParentByName(F,
"A",q.cellEditor.textarea),R="";if(null==K&&null!=F&&null!=F.getElementsByTagName)for(var d=F.getElementsByTagName("a"),f=0;f<d.length&&null==K;f++)d[f].textContent==F.textContent&&(K=d[f]);null!=K&&"A"==K.nodeName&&(R=K.getAttribute("href")||"",q.selectNode(K));var g=q.cellEditor.saveSelection();l.showLinkDialog(R,mxResources.get("apply"),mxUtils.bind(this,function(u){q.cellEditor.restoreSelection(g);null!=u&&q.insertLink(u)}))}else q.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=
D;this.addAction("autosize",function(){var F=q.getSelectionCells();if(null!=F){q.getModel().beginUpdate();try{for(var K=0;K<F.length;K++){var R=F[K];q.getModel().isVertex(R)&&(0<q.getModel().getChildCount(R)?q.updateGroupBounds([R],0,!0):q.updateCellSize(R))}}finally{q.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){q.snapCellsToGrid(q.getSelectionCells(),q.gridSize)});this.addAction("formattedText",function(){q.stopEditing();var F=q.getCommonStyle(q.getSelectionCells());
-F="1"==mxUtils.getValue(F,"html","0")?null:"1";q.getModel().beginUpdate();try{for(var K=q.getEditableCells(q.getSelectionCells()),R=0;R<K.length;R++)if(state=q.getView().getState(K[R]),null!=state){var d=mxUtils.getValue(state.style,"html","0");if("1"==d&&null==F){var f=q.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=q.sanitizeHtml(f);f=mxUtils.extractTextWithWhitespace(g.childNodes);
-q.cellLabelChanged(state.cell,f);q.setCellStyles("html",F,[K[R]])}else"0"==d&&"1"==F&&(f=mxUtils.htmlEntities(q.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),q.cellLabelChanged(state.cell,q.sanitizeHtml(f)),q.setCellStyles("html",F,[K[R]]))}l.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=F?F:"0"],"cells",K))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var F=q.getView().getState(q.getSelectionCell()),
+F="1"==mxUtils.getValue(F,"html","0")?null:"1";q.getModel().beginUpdate();try{for(var K=q.getEditableCells(q.getSelectionCells()),R=0;R<K.length;R++)if(state=q.getView().getState(K[R]),null!=state){var d=mxUtils.getValue(state.style,"html","0");if("1"==d&&null==F){var f=q.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=Graph.sanitizeHtml(f);f=mxUtils.extractTextWithWhitespace(g.childNodes);
+q.cellLabelChanged(state.cell,f);q.setCellStyles("html",F,[K[R]])}else"0"==d&&"1"==F&&(f=mxUtils.htmlEntities(q.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),q.cellLabelChanged(state.cell,Graph.sanitizeHtml(f)),q.setCellStyles("html",F,[K[R]]))}l.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=F?F:"0"],"cells",K))}finally{q.getModel().endUpdate()}});this.addAction("wordWrap",function(){var F=q.getView().getState(q.getSelectionCell()),
K="wrap";q.stopEditing();null!=F&&"wrap"==F.style[mxConstants.STYLE_WHITE_SPACE]&&(K=null);q.setCellStyles(mxConstants.STYLE_WHITE_SPACE,K)});this.addAction("rotation",function(){var F="0",K=q.getView().getState(q.getSelectionCell());null!=K&&(F=K.style[mxConstants.STYLE_ROTATION]||F);F=new FilenameDialog(l,F,mxResources.get("apply"),function(R){null!=R&&0<R.length&&q.setCellStyles(mxConstants.STYLE_ROTATION,R)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");l.showDialog(F.container,
375,80,!0,!0);F.init()});this.addAction("resetView",function(){q.zoomTo(1);l.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(F){q.isFastZoomEnabled()?q.lazyZoom(!0,!0,l.buttonZoomDelay):q.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(F){q.isFastZoomEnabled()?q.lazyZoom(!1,!0,l.buttonZoomDelay):q.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var F=q.isSelectionEmpty()?
q.getGraphBounds():q.getBoundingBox(q.getSelectionCells()),K=q.view.translate,R=q.view.scale;F.x=F.x/R-K.x;F.y=F.y/R-K.y;F.width/=R;F.height/=R;null!=q.backgroundImage&&(F=mxRectangle.fromRectangle(F),F.add(new mxRectangle(0,0,q.backgroundImage.width,q.backgroundImage.height)));0==F.width||0==F.height?(q.zoomTo(1),l.resetScrollbars()):(K=Editor.fitWindowBorders,null!=K&&(F.x-=K.x,F.y-=K.y,F.width+=K.width+K.x,F.height+=K.height+K.y),q.fitWindow(F))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",
@@ -3023,7 +3022,7 @@ q.getModel().getParent(F),g=q.getCellGeometry(F);f=Math.round(q.snap(q.popupMenu
mxUtils.bind(this,function(){q.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");N=this.addAction("superscript",mxUtils.bind(this,function(){q.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var F=mxResources.get("image")+" ("+mxResources.get("url")+"):",K=q.getView().getState(q.getSelectionCell()),
R="",d=null;null!=K&&(R=K.style[mxConstants.STYLE_IMAGE]||R,d=K.style[mxConstants.STYLE_CLIP_PATH]||d);var f=q.cellEditor.saveSelection();l.showImageDialog(F,R,function(g,u,x,A,H,P){if(q.cellEditor.isContentEditing())q.cellEditor.restoreSelection(f),q.insertImage(g,u,x);else{var M=q.getSelectionCells();if(null!=g&&(0<g.length||0<M.length)){var G=null;q.getModel().beginUpdate();try{if(0==M.length){M=[q.insertVertex(q.getDefaultParent(),null,"",0,0,u,x,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
var ia=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry(M,!0));M[0].geometry.x=ia.x;M[0].geometry.y=ia.y;null!=A&&k(M[0],A,H,P,q);G=M;q.fireEvent(new mxEventObject("cellsInserted","cells",G))}q.setCellStyles(mxConstants.STYLE_IMAGE,0<g.length?g:null,M);var ja=q.getCurrentCellStyle(M[0]);"image"!=ja[mxConstants.STYLE_SHAPE]&&"label"!=ja[mxConstants.STYLE_SHAPE]?q.setCellStyles(mxConstants.STYLE_SHAPE,"image",M):0==g.length&&q.setCellStyles(mxConstants.STYLE_SHAPE,null,M);null==A&&q.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,M);if(null!=u&&null!=x)for(g=0;g<M.length;g++){var ha=M[g];if("0"!=q.getCurrentCellStyle(ha).expand){var ba=q.getModel().getGeometry(ha);null!=ba&&(ba=ba.clone(),ba.width=u,ba.height=x,q.getModel().setGeometry(ha,ba))}null!=A&&k(ha,A,H,P,q)}}finally{q.getModel().endUpdate()}null!=G&&(q.setSelectionCells(G),q.scrollCellToVisible(G[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,d)}}).isEnabled=D;this.addAction("crop...",function(){var F=q.getSelectionCell();if(q.isEnabled()&&
+null,M);if(null!=u&&null!=x)for(g=0;g<M.length;g++){var ha=M[g];if("0"!=q.getCurrentCellStyle(ha).expand){var ca=q.getModel().getGeometry(ha);null!=ca&&(ca=ca.clone(),ca.width=u,ca.height=x,q.getModel().setGeometry(ha,ca))}null!=A&&k(ha,A,H,P,q)}}finally{q.getModel().endUpdate()}null!=G&&(q.setSelectionCells(G),q.scrollCellToVisible(G[0]))}}},q.cellEditor.isContentEditing(),!q.cellEditor.isContentEditing(),!0,d)}}).isEnabled=D;this.addAction("crop...",function(){var F=q.getSelectionCell();if(q.isEnabled()&&
!q.isCellLocked(q.getDefaultParent())&&null!=F){var K=q.getCurrentCellStyle(F),R=K[mxConstants.STYLE_IMAGE],d=K[mxConstants.STYLE_SHAPE];R&&"image"==d&&(K=new CropImageDialog(l,R,K[mxConstants.STYLE_CLIP_PATH],function(f,g,u){k(F,f,g,u,q)}),l.showDialog(K.container,300,390,!0,!0))}}).isEnabled=D;N=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(l,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){l.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),l.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");N.setToggleAction(!0);N.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
N=this.addAction("format",mxUtils.bind(this,function(){l.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");N.setToggleAction(!0);N.setSelectedCallback(mxUtils.bind(this,function(){return l.isFormatPanelVisible()}));N=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(l,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("outline"))})),
@@ -3325,7 +3324,7 @@ Oa,this.shapeForegroundColor=Aa,this.stylesheet=ta,this.refresh());return Ka};va
function(p){var E="1"==mxUtils.getValue(p.style,"enumerate",0);E&&null==p.secondLabel?(p.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),p.secondLabel.size=12,p.secondLabel.state=p,p.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(p,p.secondLabel)):E||null==p.secondLabel||(p.secondLabel.destroy(),p.secondLabel=null);E=p.secondLabel;if(null!=E){var Q=p.view.scale,Z=this.createEnumerationValue(p);p=this.graph.model.isVertex(p.cell)?
new mxRectangle(p.x+p.width-4*Q,p.y+4*Q,0,0):mxRectangle.fromPoint(p.view.getPoint(p));E.bounds.equals(p)&&E.value==Z&&E.scale==Q||(E.bounds=p,E.value=Z,E.scale=Q,E.redraw())}};var ha=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ha.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var p=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||
"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",
-p.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,p.ownerSVGElement))}};var ba=Graph.prototype.refresh;Graph.prototype.refresh=function(){ba.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var oa=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){oa.apply(this,
+p.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,p.ownerSVGElement))}};var ca=Graph.prototype.refresh;Graph.prototype.refresh=function(){ca.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var oa=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){oa.apply(this,
arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(p){"data:action/json,"==p.substring(0,17)&&(p=JSON.parse(p.substring(17)),null!=p.actions&&this.executeCustomActions(p.actions))};Graph.prototype.executeCustomActions=function(p,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));
else{this.executingCustomActions=!0;var Q=!1,Z=0,W=0,X=mxUtils.bind(this,function(){Q||(Q=!0,this.model.beginUpdate())}),da=mxUtils.bind(this,function(){Q&&(Q=!1,this.model.endUpdate())}),la=mxUtils.bind(this,function(){0<Z&&Z--;0==Z&&pa()}),pa=mxUtils.bind(this,function(){if(W<p.length){var ma=this.stoppingCustomActions,qa=p[W++],za=[];if(null!=qa.open)if(da(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open))return}else this.openLink(qa.open);null==qa.wait||ma||(this.pendingExecuteNextAction=
mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;la()}),Z++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),da());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(Z++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,la,ma?0:qa.fadeIn.delay));null!=qa.fadeOut&&
@@ -3333,7 +3332,7 @@ mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextActio
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]);if(null!=qa.tags){ya=[];null!=qa.tags.hidden&&(ya=ya.concat(qa.tags.hidden));if(null!=
qa.tags.visible)for(var ra=this.getAllTags(),ta=0;ta<ra.length;ta++)0>mxUtils.indexOf(qa.tags.visible,ra[ta])&&0>mxUtils.indexOf(ya,ra[ta])&&ya.push(ra[ta]);this.setHiddenTags(ya);this.refresh()}0<za.length&&(Z++,this.executeAnimations(za,la,ma?1:qa.steps,ma?0:qa.delay));0==Z?pa():da()}else this.stoppingCustomActions=this.executingCustomActions=!1,da(),null!=E&&E()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(p,E){var Q=this.getLinkForCell(E);null!=Q&&"data:action/json,"==Q.substring(0,
-17)&&this.setLinkForCell(E,this.updateCustomLink(p,Q));if(this.isHtmlLabel(E)){var Z=document.createElement("div");Z.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var W=Z.getElementsByTagName("a"),X=!1,da=0;da<W.length;da++)Q=W[da].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(W[da].setAttribute("href",this.updateCustomLink(p,Q)),X=!0);X&&this.labelChanged(E,Z.innerHTML)}};Graph.prototype.updateCustomLink=function(p,E){if("data:action/json,"==E.substring(0,17))try{var Q=
+17)&&this.setLinkForCell(E,this.updateCustomLink(p,Q));if(this.isHtmlLabel(E)){var Z=document.createElement("div");Z.innerHTML=Graph.sanitizeHtml(this.getLabel(E));for(var W=Z.getElementsByTagName("a"),X=!1,da=0;da<W.length;da++)Q=W[da].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(W[da].setAttribute("href",this.updateCustomLink(p,Q)),X=!0);X&&this.labelChanged(E,Z.innerHTML)}};Graph.prototype.updateCustomLink=function(p,E){if("data:action/json,"==E.substring(0,17))try{var Q=
JSON.parse(E.substring(17));null!=Q.actions&&(this.updateCustomLinkActions(p,Q.actions),E="data:action/json,"+JSON.stringify(Q))}catch(Z){}return E};Graph.prototype.updateCustomLinkActions=function(p,E){for(var Q=0;Q<E.length;Q++){var Z=E[Q],W;for(W in Z)this.updateCustomLinkAction(p,Z[W],"cells"),this.updateCustomLinkAction(p,Z[W],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(p,E,Q){if(null!=E&&null!=E[Q]){for(var Z=[],W=0;W<E[Q].length;W++)if("*"==E[Q][W])Z.push(E[Q][W]);else{var X=
p[E[Q][W]];null!=X?""!=X&&Z.push(X):Z.push(E[Q][W])}E[Q]=Z}};Graph.prototype.getCellsForAction=function(p,E){E=this.getCellsById(p.cells).concat(this.getCellsForTags(p.tags,null,E));if(null!=p.excludeCells){for(var Q=[],Z=0;Z<E.length;Z++)0>p.excludeCells.indexOf(E[Z].id)&&Q.push(E[Z]);E=Q}return E};Graph.prototype.getCellsById=function(p){var E=[];if(null!=p)for(var Q=0;Q<p.length;Q++)if("*"==p[Q]){var Z=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(X){return X!=Z},Z))}else{var W=
this.model.getCell(p[Q]);null!=W&&E.push(W)}return E};var sa=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(p){return sa.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(p))};Graph.prototype.setHiddenTags=function(p){this.hiddenTags=p;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(p){var E=mxUtils.indexOf(this.hiddenTags,p);0>E?this.hiddenTags.push(p):0<=E&&this.hiddenTags.splice(E,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
@@ -3385,10 +3384,10 @@ ta.appendChild(Ma);da.appendChild(ta);X.appendChild(da);da=document.createElemen
da.appendChild(E);var va=document.createElement("input");va.style.cssText="margin:0 8px 0 8px;";va.setAttribute("value","100 %");va.style.width="60px";da.appendChild(va);X.appendChild(da);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";da=mxUtils.button(mxResources.get("cancel"),function(){p.hideDialog()});da.className="geBtn";p.editor.cancelFirst&&E.appendChild(da);p.isOffline()||(ta=mxUtils.button(mxResources.get("help"),function(){W.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
ta.className="geBtn",E.appendChild(ta));PrintDialog.previewEnabled&&(ta=mxUtils.button(mxResources.get("preview"),function(){p.hideDialog();Z(!1)}),ta.className="geBtn",E.appendChild(ta));ta=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){p.hideDialog();Z(!0)});ta.className="geBtn gePrimaryBtn";E.appendChild(ta);p.editor.cancelFirst||E.appendChild(da);X.appendChild(E);this.container=X};var T=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 p=this.image;null!=p&&null!=p.src&&Graph.isPageLink(p.src)&&(p={originalSrc:p.src});this.page.viewState.backgroundImage=p}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
-this.shadowVisible)}}else T.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var ca=document.createElement("canvas"),Y=new Image;Y.onload=function(){try{ca.getContext("2d").drawImage(Y,
-0,0);var p=ca.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=p&&6<p.length}catch(E){}};Y.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(p){}Editor.prototype.useCanvasForExport=!1})();
+this.shadowVisible)}}else T.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var ba=document.createElement("canvas"),Y=new Image;Y.onload=function(){try{ba.getContext("2d").drawImage(Y,
+0,0);var p=ba.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=p&&6<p.length}catch(E){}};Y.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(p){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};b.afterDecode=function(e,k,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);null!=l.mathEnabled&&(l.mathEnabled=!l.mathEnabled);null!=l.shadowVisible&&(l.shadowVisible=!l.shadowVisible);return l};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.5.2";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.5.3";EditorUi.compactUi="atlas"!=Editor.currentTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;
EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,
boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,u,x,A,H){A=null!=A?A:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?
@@ -3413,10 +3412,10 @@ u.isSelectionEmpty()||mxEvent.isAltDown(A)||mxEvent.isShiftDown(A)||mxEvent.isCo
""))}else{var x=mxUtils.parseXml(d),A=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=A?mxUtils.getXml(A):""}}catch(H){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,u=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||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]));f.model.execute(new ChangePage(this,A,0==x?A:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(x=0;x<g.length;x++)f.model.execute(new ChangePage(this,g[x],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,u,x,A,H,P,M,G,ia){f=null!=f?f:this.editor.graph;x=null!=x?x:!1;M=null!=M?M:!0;var ja=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ha="_blank";else ja=ha=u;if(null==d)return"";var ba=d;if("mxfile"!=ba.nodeName.toLowerCase()){if(ia){var oa=d.ownerDocument.createElement("diagram");oa.setAttribute("id",Editor.guid());
-oa.appendChild(d)}else{oa=Graph.zapGremlins(mxUtils.getXml(d));ba=Graph.compress(oa);if(Graph.decompress(ba)!=oa)return oa;oa=d.ownerDocument.createElement("diagram");oa.setAttribute("id",Editor.guid());mxUtils.setTextContent(oa,ba)}ba=d.ownerDocument.createElement("mxfile");ba.appendChild(oa)}G?(ba=ba.cloneNode(!0),ba.removeAttribute("modified"),ba.removeAttribute("host"),ba.removeAttribute("agent"),ba.removeAttribute("etag"),ba.removeAttribute("userAgent"),ba.removeAttribute("version"),ba.removeAttribute("editor"),
-ba.removeAttribute("type")):(ba.removeAttribute("userAgent"),ba.removeAttribute("version"),ba.removeAttribute("editor"),ba.removeAttribute("pages"),ba.removeAttribute("type"),mxClient.IS_CHROMEAPP?ba.setAttribute("host","Chrome"):EditorUi.isElectronApp?ba.setAttribute("host","Electron"):ba.setAttribute("host",window.location.hostname),ba.setAttribute("modified",(new Date).toISOString()),ba.setAttribute("agent",navigator.appVersion),ba.setAttribute("version",EditorUi.VERSION),ba.setAttribute("etag",
-Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&ba.setAttribute("type",d),1<ba.getElementsByTagName("diagram").length&&null!=this.pages&&ba.setAttribute("pages",this.pages.length));ia=ia?mxUtils.getPrettyXml(ba):mxUtils.getXml(ba);if(!A&&!x&&(H||null!=g&&/(\.html)$/i.test(g.getTitle())))ia=this.getHtml2(mxUtils.getXml(ba),f,null!=g?g.getTitle():null,ha,ja);else if(A||!x&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(u=null),
+if(null!=g)for(x=0;x<g.length;x++)f.model.execute(new ChangePage(this,g[x],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,u,x,A,H,P,M,G,ia){f=null!=f?f:this.editor.graph;x=null!=x?x:!1;M=null!=M?M:!0;var ja=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ha="_blank";else ja=ha=u;if(null==d)return"";var ca=d;if("mxfile"!=ca.nodeName.toLowerCase()){if(ia){var oa=d.ownerDocument.createElement("diagram");oa.setAttribute("id",Editor.guid());
+oa.appendChild(d)}else{oa=Graph.zapGremlins(mxUtils.getXml(d));ca=Graph.compress(oa);if(Graph.decompress(ca)!=oa)return oa;oa=d.ownerDocument.createElement("diagram");oa.setAttribute("id",Editor.guid());mxUtils.setTextContent(oa,ca)}ca=d.ownerDocument.createElement("mxfile");ca.appendChild(oa)}G?(ca=ca.cloneNode(!0),ca.removeAttribute("modified"),ca.removeAttribute("host"),ca.removeAttribute("agent"),ca.removeAttribute("etag"),ca.removeAttribute("userAgent"),ca.removeAttribute("version"),ca.removeAttribute("editor"),
+ca.removeAttribute("type")):(ca.removeAttribute("userAgent"),ca.removeAttribute("version"),ca.removeAttribute("editor"),ca.removeAttribute("pages"),ca.removeAttribute("type"),mxClient.IS_CHROMEAPP?ca.setAttribute("host","Chrome"):EditorUi.isElectronApp?ca.setAttribute("host","Electron"):ca.setAttribute("host",window.location.hostname),ca.setAttribute("modified",(new Date).toISOString()),ca.setAttribute("agent",navigator.appVersion),ca.setAttribute("version",EditorUi.VERSION),ca.setAttribute("etag",
+Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&ca.setAttribute("type",d),1<ca.getElementsByTagName("diagram").length&&null!=this.pages&&ca.setAttribute("pages",this.pages.length));ia=ia?mxUtils.getPrettyXml(ca):mxUtils.getXml(ca);if(!A&&!x&&(H||null!=g&&/(\.html)$/i.test(g.getTitle())))ia=this.getHtml2(mxUtils.getXml(ca),f,null!=g?g.getTitle():null,ha,ja);else if(A||!x&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(u=null),
ia=this.getEmbeddedSvg(ia,f,u,null,P,M,ja);return ia};EditorUi.prototype.getXmlFileData=function(d,f,g,u){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var x=this.editor.getGraphXml(d,u);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(M){var G=M.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(M)),M=M.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&M.appendChild(mxUtils.parseXml(G).documentElement))):
null==G||g?M=M.cloneNode(!0):(M=M.cloneNode(!1),mxUtils.setTextContent(M,Graph.compressNode(G)));x.appendChild(M)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(x)),x=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var A=this.pages[f],H=A.node;if(A!=this.currentPage)if(A.needsUpdate){var P=new mxCodec(mxUtils.createXmlDocument());P=P.encode(new mxGraphModel(A.root));this.editor.graph.saveViewState(A.viewState,
P,null,u);EditorUi.removeChildNodes(H);mxUtils.setTextContent(H,Graph.compressNode(P));delete A.needsUpdate}else u&&(this.updatePageRoot(A),null!=A.viewState.backgroundImage&&(null!=A.viewState.backgroundImage.originalSrc?A.viewState.backgroundImage=this.createImageForPageLink(A.viewState.backgroundImage.originalSrc,A):Graph.isPageLink(A.viewState.backgroundImage.src)&&(A.viewState.backgroundImage=this.createImageForPageLink(A.viewState.backgroundImage.src,A))),null!=A.viewState.backgroundImage&&
@@ -3427,8 +3426,8 @@ d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(A){d[EditorUi.DIFF_INSER
d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?
f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,u,x,A,H,
-P,M,G,ia){x=null!=x?x:!0;A=null!=A?A:!1;var ja=this.editor.graph;if(f||!d&&null!=M&&/(\.svg)$/i.test(M.getTitle())){var ha=null!=ja.themes&&"darkTheme"==ja.defaultThemeName;G=!1;if(ha||null!=this.pages&&this.currentPage!=this.pages[0]){var ba=ja.getGlobalVariable;ja=this.createTemporaryGraph(ha?ja.getDefaultStylesheet():ja.getStylesheet());ja.setBackgroundImage=this.editor.graph.setBackgroundImage;ja.background=this.editor.graph.background;var oa=null!=this.pages?this.pages[0]:null;null==oa||this.currentPage==
-oa?ja.setBackgroundImage(this.editor.graph.backgroundImage):null!=oa.viewState&&null!=oa.viewState&&ja.setBackgroundImage(oa.viewState.backgroundImage);ja.getGlobalVariable=function(sa){return"page"==sa&&null!=oa?oa.getName():"pagenumber"==sa?1:ba.apply(this,arguments)};document.body.appendChild(ja.container);null!=oa&&ja.model.setRoot(oa.root)}}H=null!=H?H:this.getXmlFileData(x,A,G,ia);M=null!=M?M:this.getCurrentFile();d=this.createFileData(H,ja,M,window.location.href,d,f,g,u,x,P,G);ja!=this.editor.graph&&
+P,M,G,ia){x=null!=x?x:!0;A=null!=A?A:!1;var ja=this.editor.graph;if(f||!d&&null!=M&&/(\.svg)$/i.test(M.getTitle())){var ha=null!=ja.themes&&"darkTheme"==ja.defaultThemeName;G=!1;if(ha||null!=this.pages&&this.currentPage!=this.pages[0]){var ca=ja.getGlobalVariable;ja=this.createTemporaryGraph(ha?ja.getDefaultStylesheet():ja.getStylesheet());ja.setBackgroundImage=this.editor.graph.setBackgroundImage;ja.background=this.editor.graph.background;var oa=null!=this.pages?this.pages[0]:null;null==oa||this.currentPage==
+oa?ja.setBackgroundImage(this.editor.graph.backgroundImage):null!=oa.viewState&&null!=oa.viewState&&ja.setBackgroundImage(oa.viewState.backgroundImage);ja.getGlobalVariable=function(sa){return"page"==sa&&null!=oa?oa.getName():"pagenumber"==sa?1:ca.apply(this,arguments)};document.body.appendChild(ja.container);null!=oa&&ja.model.setRoot(oa.root)}}H=null!=H?H:this.getXmlFileData(x,A,G,ia);M=null!=M?M:this.getCurrentFile();d=this.createFileData(H,ja,M,window.location.href,d,f,g,u,x,P,G);ja!=this.editor.graph&&
ja.container.parentNode.removeChild(ja.container);return d};EditorUi.prototype.getHtml=function(d,f,g,u,x,A){A=null!=A?A:!0;var H=null,P=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){H=A?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var M=f.view.scale;A=Math.floor(H.x/M-f.view.translate.x);M=Math.floor(H.y/M-f.view.translate.y);H=f.background;null==x&&(f=this.getBasenames().join(";"),0<f.length&&(P=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",A);d.setAttribute("y0",
M)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=u&&d.setAttribute("edit",u));null!=x&&(x=x.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";u=Graph.compress(d);Graph.decompress(u)!=d&&(u=encodeURIComponent(d));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+
(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+(null==x&&null!=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;">'+u+"</div>\n</div>\n"+(null==x?'<script type="text/javascript" src="'+
@@ -3439,19 +3438,19 @@ null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g
d[u].getAttribute("id")&&d[u].setAttribute("id",u),f=new DiagramPage(d[u]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[u+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var x=urlParams["layer-ids"].split(" ");f={};for(u=0;u<x.length;u++)f[x[u]]=!0;var A=this.editor.graph.getModel(),H=A.getChildren(A.root);for(u=0;u<H.length;u++){var P=H[u];A.setVisible(P,f[P.id]||!1)}}catch(M){}};EditorUi.prototype.getBaseFilename=function(d){var f=
this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
-function(d,f,g,u,x,A,H,P,M,G,ia,ja){try{u=null!=u?u:this.editor.graph.isSelectionEmpty();var ha=this.getBaseFilename("remoteSvg"==d?!1:!x),ba=ha+("xml"==d||"pdf"==d&&ia?".drawio":"")+"."+d;if("xml"==d){var oa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,u,x,null,null,null,f);this.saveData(ba,d,oa,"text/xml")}else if("html"==d)oa=this.getHtml2(this.getFileData(!0),this.editor.graph,ha),this.saveData(ba,d,oa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,
-mxResources.get("export"))){if("xmlpng"==d)ba=ha+".png";else if("jpeg"==d)ba=ha+".jpg";else if("remoteSvg"==d){ba=ha+".svg";d="svg";var sa=parseInt(M);"string"===typeof P&&0<P.indexOf("%")&&(P=parseInt(P)/100);if(0<sa){var J=this.editor.graph,V=J.getGraphBounds();var T=Math.ceil(V.width*P/J.view.scale+2*sa);var ca=Math.ceil(V.height*P/J.view.scale+2*sa)}}this.saveRequest(ba,d,mxUtils.bind(this,function(Z,W){try{var X=this.editor.graph.pageVisible;0==A&&(this.editor.graph.pageVisible=A);var da=this.createDownloadRequest(Z,
-d,u,W,H,x,P,M,G,ia,ja,T,ca);this.editor.graph.pageVisible=X;return da}catch(la){this.handleError(la)}}))}else{var Y=null,p=mxUtils.bind(this,function(Z){Z.length<=MAX_REQUEST_SIZE?this.saveData(ba,"svg",Z,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Y)}))});if("svg"==d){var E=this.editor.graph.background;if(H||E==mxConstants.NONE)E=null;var Q=this.editor.graph.getSvg(E,null,null,null,null,u);g&&this.editor.graph.addSvgShadow(Q);
-this.editor.convertImages(Q,mxUtils.bind(this,mxUtils.bind(this,function(Z){this.spinner.stop();p(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(Z))})))}else ba=ha+".svg",Y=this.getFileData(!1,!0,null,mxUtils.bind(this,function(Z){this.spinner.stop();p(Z)}),u)}}catch(Z){this.handleError(Z)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha){d=this.downloadRequestBuilder(d,f,g,u,x,A,H,P,M,G,ia,ja,ha);f="";for(var ba in d)g=d[ba],null!=g&&(f+=ba+"="+encodeURIComponent(g)+
-"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha){var ba=this.editor.graph,oa=ba.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==A?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var sa=null,J=null,V=null;if(oa.width*oa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=ia?(sa=ia.from,J=ia.to):0==A&&(V="1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==
-f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(A=0;A<this.pages.length;A++)if(this.pages[A]==this.currentPage){sa=A;break}A=ba.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!x?x||null!=A&&A!=mxConstants.NONE||(A="#ffffff"):A=mxConstants.NONE;x={globalVars:ba.getExportVariables()};M&&(x.grid={size:ba.gridSize,steps:ba.view.gridSteps,color:ba.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:f,from:sa,to:J,allPages:V,bg:null!=A?A:mxConstants.NONE,
+function(d,f,g,u,x,A,H,P,M,G,ia,ja){try{u=null!=u?u:this.editor.graph.isSelectionEmpty();var ha=this.getBaseFilename("remoteSvg"==d?!1:!x),ca=ha+("xml"==d||"pdf"==d&&ia?".drawio":"")+"."+d;if("xml"==d){var oa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,u,x,null,null,null,f);this.saveData(ca,d,oa,"text/xml")}else if("html"==d)oa=this.getHtml2(this.getFileData(!0),this.editor.graph,ha),this.saveData(ca,d,oa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,
+mxResources.get("export"))){if("xmlpng"==d)ca=ha+".png";else if("jpeg"==d)ca=ha+".jpg";else if("remoteSvg"==d){ca=ha+".svg";d="svg";var sa=parseInt(M);"string"===typeof P&&0<P.indexOf("%")&&(P=parseInt(P)/100);if(0<sa){var J=this.editor.graph,V=J.getGraphBounds();var T=Math.ceil(V.width*P/J.view.scale+2*sa);var ba=Math.ceil(V.height*P/J.view.scale+2*sa)}}this.saveRequest(ca,d,mxUtils.bind(this,function(Z,W){try{var X=this.editor.graph.pageVisible;0==A&&(this.editor.graph.pageVisible=A);var da=this.createDownloadRequest(Z,
+d,u,W,H,x,P,M,G,ia,ja,T,ba);this.editor.graph.pageVisible=X;return da}catch(la){this.handleError(la)}}))}else{var Y=null,p=mxUtils.bind(this,function(Z){Z.length<=MAX_REQUEST_SIZE?this.saveData(ca,"svg",Z,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Y)}))});if("svg"==d){var E=this.editor.graph.background;if(H||E==mxConstants.NONE)E=null;var Q=this.editor.graph.getSvg(E,null,null,null,null,u);g&&this.editor.graph.addSvgShadow(Q);
+this.editor.convertImages(Q,mxUtils.bind(this,mxUtils.bind(this,function(Z){this.spinner.stop();p(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(Z))})))}else ca=ha+".svg",Y=this.getFileData(!1,!0,null,mxUtils.bind(this,function(Z){this.spinner.stop();p(Z)}),u)}}catch(Z){this.handleError(Z)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha){d=this.downloadRequestBuilder(d,f,g,u,x,A,H,P,M,G,ia,ja,ha);f="";for(var ca in d)g=d[ca],null!=g&&(f+=ca+"="+encodeURIComponent(g)+
+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha){var ca=this.editor.graph,oa=ca.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==A?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var sa=null,J=null,V=null;if(oa.width*oa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=ia?(sa=ia.from,J=ia.to):0==A&&(V="1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==
+f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(A=0;A<this.pages.length;A++)if(this.pages[A]==this.currentPage){sa=A;break}A=ca.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!x?x||null!=A&&A!=mxConstants.NONE||(A="#ffffff"):A=mxConstants.NONE;x={globalVars:ca.getExportVariables()};M&&(x.grid={size:ca.gridSize,steps:ca.view.gridSteps,color:ca.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return{format:f,from:sa,to:J,allPages:V,bg:null!=A?A:mxConstants.NONE,
base64:u,embedXml:G,xml:g,filename:null!=d?d:"",extras:JSON.stringify(x),scale:H,border:P,w:ja&&isFinite(ja)?ja:null,h:ha&&isFinite(ha)?ha:null}};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var u=window.location.hash,x=mxUtils.bind(this,function(H){var P=null!=d.data?d.data:"";null!=H&&0<H.length&&(0<P.length&&(P+="\n"),P+=H);H=new LocalFile(this,"csv"!=d.format&&0<P.length?P:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);H.getHash=function(){return u};this.fileLoaded(H);"csv"==d.format&&this.importCsv(P,mxUtils.bind(this,function(ha){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var M=null!=d.interval?parseInt(d.interval):6E4,G=null,ia=mxUtils.bind(this,function(){var ha=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ba){ha===this.currentPage&&
-(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),ja()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),ja=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(ia,M)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ja();ia()}));ja();ia()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var A=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(A,mxUtils.bind(this,
-function(H){x(H)}),mxUtils.bind(this,function(H){null!=g&&g(H)}))}else x("")};EditorUi.prototype.updateDiagram=function(d){function f(ca){var Y=new mxCellOverlay(ca.image||x.warningImage,ca.tooltip,ca.align,ca.valign,ca.offset);Y.addListener(mxEvent.CLICK,function(p,E){u.alert(ca.tooltip)});return Y}var g=null,u=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var x=this.editor.graph,A=x.getModel();A.beginUpdate();var H=null;try{for(d=
-d.firstChild;null!=d;){if("update"==d.nodeName){var P=A.getCell(d.getAttribute("id"));if(null!=P){try{var M=d.getAttribute("value");if(null!=M){var G=mxUtils.parseXml(M).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))A.setValue(P,G);else for(var ia=G.attributes,ja=0;ja<ia.length;ja++)x.setAttributeForCell(P,ia[ja].nodeName,0<ia[ja].nodeValue.length?ia[ja].nodeValue:null)}}catch(ca){null!=window.console&&console.log("Error in value for "+P.id+": "+ca)}try{var ha=d.getAttribute("style");
-null!=ha&&x.model.setStyle(P,ha)}catch(ca){null!=window.console&&console.log("Error in style for "+P.id+": "+ca)}try{var ba=d.getAttribute("icon");if(null!=ba){var oa=0<ba.length?JSON.parse(ba):null;null!=oa&&oa.append||x.removeCellOverlays(P);null!=oa&&x.addCellOverlay(P,f(oa))}}catch(ca){null!=window.console&&console.log("Error in icon for "+P.id+": "+ca)}try{var sa=d.getAttribute("geometry");if(null!=sa){sa=JSON.parse(sa);var J=x.getCellGeometry(P);if(null!=J){J=J.clone();for(key in sa){var V=
-parseFloat(sa[key]);"dx"==key?J.x+=V:"dy"==key?J.y+=V:"dw"==key?J.width+=V:"dh"==key?J.height+=V:J[key]=parseFloat(sa[key])}x.model.setGeometry(P,J)}}}catch(ca){null!=window.console&&console.log("Error in icon for "+P.id+": "+ca)}}}else if("model"==d.nodeName){for(var T=d.firstChild;null!=T&&T.nodeType!=mxConstants.NODETYPE_ELEMENT;)T=T.nextSibling;null!=T&&(new mxCodec(d.firstChild)).decode(T,A)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(x.view.scale=parseFloat(d.getAttribute("scale"))),
+this.defaultFilename,!0);H.getHash=function(){return u};this.fileLoaded(H);"csv"==d.format&&this.importCsv(P,mxUtils.bind(this,function(ha){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var M=null!=d.interval?parseInt(d.interval):6E4,G=null,ia=mxUtils.bind(this,function(){var ha=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ca){ha===this.currentPage&&
+(200<=ca.getStatus()&&300>=ca.getStatus()?(this.updateDiagram(ca.getText()),ja()):this.handleError({message:mxResources.get("error")+" "+ca.getStatus()}))}),mxUtils.bind(this,function(ca){this.handleError(ca)}))}),ja=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(ia,M)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ja();ia()}));ja();ia()}null!=f&&f()});if(null!=d.url&&0<d.url.length){var A=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(A,mxUtils.bind(this,
+function(H){x(H)}),mxUtils.bind(this,function(H){null!=g&&g(H)}))}else x("")};EditorUi.prototype.updateDiagram=function(d){function f(ba){var Y=new mxCellOverlay(ba.image||x.warningImage,ba.tooltip,ba.align,ba.valign,ba.offset);Y.addListener(mxEvent.CLICK,function(p,E){u.alert(ba.tooltip)});return Y}var g=null,u=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var x=this.editor.graph,A=x.getModel();A.beginUpdate();var H=null;try{for(d=
+d.firstChild;null!=d;){if("update"==d.nodeName){var P=A.getCell(d.getAttribute("id"));if(null!=P){try{var M=d.getAttribute("value");if(null!=M){var G=mxUtils.parseXml(M).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))A.setValue(P,G);else for(var ia=G.attributes,ja=0;ja<ia.length;ja++)x.setAttributeForCell(P,ia[ja].nodeName,0<ia[ja].nodeValue.length?ia[ja].nodeValue:null)}}catch(ba){null!=window.console&&console.log("Error in value for "+P.id+": "+ba)}try{var ha=d.getAttribute("style");
+null!=ha&&x.model.setStyle(P,ha)}catch(ba){null!=window.console&&console.log("Error in style for "+P.id+": "+ba)}try{var ca=d.getAttribute("icon");if(null!=ca){var oa=0<ca.length?JSON.parse(ca):null;null!=oa&&oa.append||x.removeCellOverlays(P);null!=oa&&x.addCellOverlay(P,f(oa))}}catch(ba){null!=window.console&&console.log("Error in icon for "+P.id+": "+ba)}try{var sa=d.getAttribute("geometry");if(null!=sa){sa=JSON.parse(sa);var J=x.getCellGeometry(P);if(null!=J){J=J.clone();for(key in sa){var V=
+parseFloat(sa[key]);"dx"==key?J.x+=V:"dy"==key?J.y+=V:"dw"==key?J.width+=V:"dh"==key?J.height+=V:J[key]=parseFloat(sa[key])}x.model.setGeometry(P,J)}}}catch(ba){null!=window.console&&console.log("Error in icon for "+P.id+": "+ba)}}}else if("model"==d.nodeName){for(var T=d.firstChild;null!=T&&T.nodeType!=mxConstants.NODETYPE_ELEMENT;)T=T.nextSibling;null!=T&&(new mxCodec(d.firstChild)).decode(T,A)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(x.view.scale=parseFloat(d.getAttribute("scale"))),
d.hasAttribute("dx")||d.hasAttribute("dy"))x.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(H=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{A.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var u=g.lastIndexOf(".");0<=
u&&(d=g.substring(u),g=g.substring(0,u));if(f){f=g;var x=new Date;g=x.getFullYear();u=x.getMonth()+1;var A=x.getDate(),H=x.getHours(),P=x.getMinutes();x=x.getSeconds();g=f+(" "+(g+"-"+u+"-"+A+"-"+H+"-"+P+"-"+x))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var u=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),
g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var x=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));
@@ -3466,21 +3465,21 @@ f,g)+this.hashValue(H,f,g))}}if(null!=d.childNodes)for(x=0;x<d.childNodes.length
mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var u=g.previousSibling;f.insertBefore(g,d);f.insertBefore(u,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var u=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,u,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,u){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var x=this.sidebar.palettes[d.getHash()];x=null!=x?x[x.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var A=null,H=mxUtils.bind(this,function(T,ca){0==T.length&&d.isEditable()?
-(null==A&&(A=document.createElement("div"),A.className="geDropTarget",mxUtils.write(A,mxResources.get("dragElementsHere"))),ca.appendChild(A)):this.addLibraryEntries(T,ca)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var P=this.sidebar.addPalette(d.getHash(),g,null!=u?u:!0,mxUtils.bind(this,function(T){H(f,T)}));this.repositionLibrary(x);var M=P.parentNode.previousSibling;u=M.getAttribute("title");
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,u){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var x=this.sidebar.palettes[d.getHash()];x=null!=x?x[x.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var A=null,H=mxUtils.bind(this,function(T,ba){0==T.length&&d.isEditable()?
+(null==A&&(A=document.createElement("div"),A.className="geDropTarget",mxUtils.write(A,mxResources.get("dragElementsHere"))),ba.appendChild(A)):this.addLibraryEntries(T,ba)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var P=this.sidebar.addPalette(d.getHash(),g,null!=u?u:!0,mxUtils.bind(this,function(T){H(f,T)}));this.repositionLibrary(x);var M=P.parentNode.previousSibling;u=M.getAttribute("title");
null!=u&&0<u.length&&".scratchpad"!=d.title&&M.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+u);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";M.style.position="relative";var ia=document.createElement("img");ia.className="geAdaptiveAsset";ia.setAttribute("src",Editor.crossImage);ia.setAttribute("title",mxResources.get("close"));ia.setAttribute("valign","absmiddle");ia.setAttribute("border",
-"0");ia.style.position="relative";ia.style.top="2px";ia.style.width="14px";ia.style.cursor="pointer";ia.style.margin="0 3px";var ja=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(ia),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(T){if(!mxEvent.isConsumed(T)){var ca=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=ja?this.confirm(mxResources.get("allChangesLost"),null,ca,mxResources.get("cancel"),mxResources.get("discardChanges")):ca();mxEvent.consume(T)}}));
-if(d.isEditable()){var ha=this.editor.graph,ba=null,oa=mxUtils.bind(this,function(T){this.showLibraryDialog(d.getTitle(),P,f,d,d.getMode());mxEvent.consume(T)}),sa=mxUtils.bind(this,function(T){d.setModified(!0);d.isAutosave()?(null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba),ba=ia.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",G.insertBefore(ba,G.firstChild),
-M.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=ba&&null!=ba.parentNode&&(ba.parentNode.removeChild(ba),M.style.paddingRight=18*G.childNodes.length+"px")})):null==ja&&(ja=ia.cloneNode(!1),ja.setAttribute("src",Editor.saveImage),ja.setAttribute("title",mxResources.get("save")),G.insertBefore(ja,G.firstChild),mxEvent.addListener(ja,"click",mxUtils.bind(this,function(ca){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==
-LocalLibrary,!0,function(){null==ja||d.isModified()||(M.style.paddingRight=18*G.childNodes.length+"px",ja.parentNode.removeChild(ja),ja=null)});mxEvent.consume(ca)})),M.style.paddingRight=18*G.childNodes.length+"px")}),J=mxUtils.bind(this,function(T,ca,Y,p){T=ha.cloneCells(mxUtils.sortCells(ha.model.getTopmostCells(T)));for(var E=0;E<T.length;E++){var Q=ha.getCellGeometry(T[E]);null!=Q&&Q.translate(-ca.x,-ca.y)}P.appendChild(this.sidebar.createVertexTemplateFromCells(T,ca.width,ca.height,p||"",!0,
-null,!1));T={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(T))),w:ca.width,h:ca.height};null!=p&&(T.title=p);f.push(T);sa(Y);null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null)}),V=mxUtils.bind(this,function(T){if(ha.isSelectionEmpty())ha.getRubberband().isActive()?(ha.getRubberband().execute(T),ha.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ca=ha.getSelectionCells(),
-Y=ha.view.getBounds(ca),p=ha.view.scale;Y.x/=p;Y.y/=p;Y.width/=p;Y.height/=p;Y.x-=ha.view.translate.x;Y.y-=ha.view.translate.y;J(ca,Y)}mxEvent.consume(T)});mxEvent.addGestureListeners(P,function(){},mxUtils.bind(this,function(T){ha.isMouseDown&&null!=ha.panningManager&&null!=ha.graphHandler.first&&(ha.graphHandler.suspend(),null!=ha.graphHandler.hint&&(ha.graphHandler.hint.style.visibility="hidden"),P.style.backgroundColor="#f1f3f4",P.style.cursor="copy",ha.panningManager.stop(),ha.autoScroll=!1,
+"0");ia.style.position="relative";ia.style.top="2px";ia.style.width="14px";ia.style.cursor="pointer";ia.style.margin="0 3px";var ja=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(ia),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(T){if(!mxEvent.isConsumed(T)){var ba=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=ja?this.confirm(mxResources.get("allChangesLost"),null,ba,mxResources.get("cancel"),mxResources.get("discardChanges")):ba();mxEvent.consume(T)}}));
+if(d.isEditable()){var ha=this.editor.graph,ca=null,oa=mxUtils.bind(this,function(T){this.showLibraryDialog(d.getTitle(),P,f,d,d.getMode());mxEvent.consume(T)}),sa=mxUtils.bind(this,function(T){d.setModified(!0);d.isAutosave()?(null!=ca&&null!=ca.parentNode&&ca.parentNode.removeChild(ca),ca=ia.cloneNode(!1),ca.setAttribute("src",Editor.spinImage),ca.setAttribute("title",mxResources.get("saving")),ca.style.cursor="default",ca.style.marginRight="2px",ca.style.marginTop="-2px",G.insertBefore(ca,G.firstChild),
+M.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=ca&&null!=ca.parentNode&&(ca.parentNode.removeChild(ca),M.style.paddingRight=18*G.childNodes.length+"px")})):null==ja&&(ja=ia.cloneNode(!1),ja.setAttribute("src",Editor.saveImage),ja.setAttribute("title",mxResources.get("save")),G.insertBefore(ja,G.firstChild),mxEvent.addListener(ja,"click",mxUtils.bind(this,function(ba){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==
+LocalLibrary,!0,function(){null==ja||d.isModified()||(M.style.paddingRight=18*G.childNodes.length+"px",ja.parentNode.removeChild(ja),ja=null)});mxEvent.consume(ba)})),M.style.paddingRight=18*G.childNodes.length+"px")}),J=mxUtils.bind(this,function(T,ba,Y,p){T=ha.cloneCells(mxUtils.sortCells(ha.model.getTopmostCells(T)));for(var E=0;E<T.length;E++){var Q=ha.getCellGeometry(T[E]);null!=Q&&Q.translate(-ba.x,-ba.y)}P.appendChild(this.sidebar.createVertexTemplateFromCells(T,ba.width,ba.height,p||"",!0,
+null,!1));T={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(T))),w:ba.width,h:ba.height};null!=p&&(T.title=p);f.push(T);sa(Y);null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null)}),V=mxUtils.bind(this,function(T){if(ha.isSelectionEmpty())ha.getRubberband().isActive()?(ha.getRubberband().execute(T),ha.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ba=ha.getSelectionCells(),
+Y=ha.view.getBounds(ba),p=ha.view.scale;Y.x/=p;Y.y/=p;Y.width/=p;Y.height/=p;Y.x-=ha.view.translate.x;Y.y-=ha.view.translate.y;J(ba,Y)}mxEvent.consume(T)});mxEvent.addGestureListeners(P,function(){},mxUtils.bind(this,function(T){ha.isMouseDown&&null!=ha.panningManager&&null!=ha.graphHandler.first&&(ha.graphHandler.suspend(),null!=ha.graphHandler.hint&&(ha.graphHandler.hint.style.visibility="hidden"),P.style.backgroundColor="#f1f3f4",P.style.cursor="copy",ha.panningManager.stop(),ha.autoScroll=!1,
mxEvent.consume(T))}),mxUtils.bind(this,function(T){ha.isMouseDown&&null!=ha.panningManager&&null!=ha.graphHandler&&(P.style.backgroundColor="",P.style.cursor="default",this.sidebar.showTooltips=!0,ha.panningManager.stop(),ha.graphHandler.reset(),ha.isMouseDown=!1,ha.autoScroll=!0,V(T),mxEvent.consume(T))}));mxEvent.addListener(P,"mouseleave",mxUtils.bind(this,function(T){ha.isMouseDown&&null!=ha.graphHandler.first&&(ha.graphHandler.resume(),null!=ha.graphHandler.hint&&(ha.graphHandler.hint.style.visibility=
"visible"),P.style.backgroundColor="",P.style.cursor="",ha.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(P,"dragover",mxUtils.bind(this,function(T){P.style.backgroundColor="#f1f3f4";T.dataTransfer.dropEffect="copy";P.style.cursor="copy";this.sidebar.hideTooltip();T.stopPropagation();T.preventDefault()})),mxEvent.addListener(P,"drop",mxUtils.bind(this,function(T){P.style.cursor="";P.style.backgroundColor="";0<T.dataTransfer.files.length&&this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,
-mxUtils.bind(this,function(ca,Y,p,E,Q,Z,W,X,da){if(null!=ca&&"image/"==Y.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,Q,Z),ca)],ca[0].vertex=!0,J(ca,new mxRectangle(0,0,Q,Z),T,mxEvent.isAltDown(T)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null);else{var la=!1,pa=mxUtils.bind(this,function(ma,
+mxUtils.bind(this,function(ba,Y,p,E,Q,Z,W,X,da){if(null!=ba&&"image/"==Y.substring(0,6))ba="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ba),ba=[new mxCell("",new mxGeometry(0,0,Q,Z),ba)],ba[0].vertex=!0,J(ba,new mxRectangle(0,0,Q,Z),T,mxEvent.isAltDown(T)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null);else{var la=!1,pa=mxUtils.bind(this,function(ma,
qa){null!=ma&&"application/pdf"==qa&&(qa=Editor.extractGraphModelFromPdf(ma),null!=qa&&0<qa.length&&(ma=qa));if(null!=ma)if(ma=mxUtils.parseXml(ma),"mxlibrary"==ma.documentElement.nodeName)try{var za=JSON.parse(mxUtils.getTextContent(ma.documentElement));H(za,P);f=f.concat(za);sa(T);this.spinner.stop();la=!0}catch(Aa){}else if("mxfile"==ma.documentElement.nodeName)try{var ya=ma.documentElement.getElementsByTagName("diagram");for(za=0;za<ya.length;za++){var ra=this.stringToCells(Editor.getDiagramNodeXml(ya[za])),
ta=this.editor.graph.getBoundingBoxFromGeometry(ra);J(ra,new mxRectangle(0,0,ta.width,ta.height),T)}la=!0}catch(Aa){null!=window.console&&console.log("error in drop handler:",Aa)}la||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=A&&null!=A.parentNode&&0<f.length&&(A.parentNode.removeChild(A),A=null)});null!=da&&null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W)||/(\.vs(x|sx?))($|\?)/i.test(W))?this.importVisio(da,function(ma){pa(ma,"text/xml")},null,W):(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(ca,W)&&null!=da?this.isExternalDataComms()?this.parseFile(da,mxUtils.bind(this,function(ma){4==ma.readyState&&(this.spinner.stop(),200<=ma.status&&299>=ma.status?pa(ma.responseText,"text/xml"):this.handleError({message:mxResources.get(413==ma.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):pa(ca,Y)}}));T.stopPropagation();T.preventDefault()})),
+this.isRemoteFileFormat(ba,W)&&null!=da?this.isExternalDataComms()?this.parseFile(da,mxUtils.bind(this,function(ma){4==ma.readyState&&(this.spinner.stop(),200<=ma.status&&299>=ma.status?pa(ma.responseText,"text/xml"):this.handleError({message:mxResources.get(413==ma.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):pa(ba,Y)}}));T.stopPropagation();T.preventDefault()})),
mxEvent.addListener(P,"dragleave",function(T){P.style.cursor="";P.style.backgroundColor="";T.stopPropagation();T.preventDefault()}));ia=ia.cloneNode(!1);ia.setAttribute("src",Editor.editImage);ia.setAttribute("title",mxResources.get("edit"));G.insertBefore(ia,G.firstChild);mxEvent.addListener(ia,"click",oa);mxEvent.addListener(P,"dblclick",function(T){mxEvent.getSource(T)==P&&oa(T)});u=ia.cloneNode(!1);u.setAttribute("src",Editor.plusImage);u.setAttribute("title",mxResources.get("add"));G.insertBefore(u,
G.firstChild);mxEvent.addListener(u,"click",V);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(u=document.createElement("span"),u.setAttribute("title",mxResources.get("help")),u.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(u,"?"),mxEvent.addGestureListeners(u,mxUtils.bind(this,function(T){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(T)})),G.insertBefore(u,G.firstChild))}M.appendChild(G);M.style.paddingRight=
18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var u=d[g],x=u.data;if(null!=x){x=this.convertDataUri(x);var A="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==u.aspect&&(A+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(A+"image="+x,u.w,u.h,"",u.title||"",!1,null,!0))}else null!=u.xml&&(x=this.stringToCells(Graph.decompress(u.xml)),0<x.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(x,
@@ -3489,12 +3488,12 @@ Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.init
EditorUi.prototype.showBackgroundImageDialog=function(d,f,g){d=null!=d?d:mxUtils.bind(this,function(u,x,A){x||this.editor.graph.model.execute(new ChangePageSetup(this,A,u))});d=new BackgroundImageDialog(this,d,f,g);this.showDialog(d.container,400,240,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,u,x){d=new LibraryDialog(this,d,f,g,u,x);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(A){A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));
d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){if("1"!=urlParams.embedInline){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");
f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(u){u.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(u){this.actions.get("shapes").funct();
-mxEvent.consume(u)}));d.appendChild(f);return d}return null};EditorUi.prototype.handleError=function(d,f,g,u,x,A,H){var P=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},M=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{H?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(ba){}if(null!=
+mxEvent.consume(u)}));d.appendChild(f);return d}return null};EditorUi.prototype.handleError=function(d,f,g,u,x,A,H){var P=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},M=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{H?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(ca){}if(null!=
M||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),ia=null;f=null!=f?f:mxResources.get("error");if(null!=M){null!=M.retry&&(G=mxResources.get("cancel"),ia=function(){P();M.retry()});if(404==M.code||404==M.status||403==M.code){H=403==M.code?null!=M.message?mxUtils.htmlEntities(M.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
this.drive.user.displayName+", "+this.drive.user.email+")":""));var ja=null!=x?null:null!=A?A:window.location.hash;if(null!=ja&&("#G"==ja.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ja.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==M.code||404==M.status)){ja="#U"==ja.substring(0,2)?ja.substring(45,ja.lastIndexOf("%26ex")):
-ja.substring(2);this.showError(f,H,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ja);this.handleError(d,f,g,u,x)}),ia,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ba(){V.innerText="";for(var T=0;T<oa.length;T++){var ca=document.createElement("option");mxUtils.write(ca,oa[T].displayName);ca.value=T;V.appendChild(ca);ca=document.createElement("option");ca.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ca,
-"<"+oa[T].email+">");ca.setAttribute("disabled","disabled");V.appendChild(ca)}ca=document.createElement("option");mxUtils.write(ca,mxResources.get("addAccount"));ca.value=oa.length;V.appendChild(ca)}var oa=this.drive.getUsersList(),sa=document.createElement("div"),J=document.createElement("span");J.style.marginTop="6px";mxUtils.write(J,mxResources.get("changeUser")+": ");sa.appendChild(J);var V=document.createElement("select");V.style.width="200px";ba();mxEvent.addListener(V,"change",mxUtils.bind(this,
-function(){var T=V.value,ca=oa.length!=T;ca&&this.drive.setUser(oa[T]);this.drive.authorize(ca,mxUtils.bind(this,function(){ca||(oa=this.drive.getUsersList(),ba())}),mxUtils.bind(this,function(Y){this.handleError(Y)}),!0)}));sa.appendChild(V);sa=new CustomDialog(this,sa,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(sa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=
+ja.substring(2);this.showError(f,H,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ja);this.handleError(d,f,g,u,x)}),ia,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){V.innerText="";for(var T=0;T<oa.length;T++){var ba=document.createElement("option");mxUtils.write(ba,oa[T].displayName);ba.value=T;V.appendChild(ba);ba=document.createElement("option");ba.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ba,
+"<"+oa[T].email+">");ba.setAttribute("disabled","disabled");V.appendChild(ba)}ba=document.createElement("option");mxUtils.write(ba,mxResources.get("addAccount"));ba.value=oa.length;V.appendChild(ba)}var oa=this.drive.getUsersList(),sa=document.createElement("div"),J=document.createElement("span");J.style.marginTop="6px";mxUtils.write(J,mxResources.get("changeUser")+": ");sa.appendChild(J);var V=document.createElement("select");V.style.width="200px";ca();mxEvent.addListener(V,"change",mxUtils.bind(this,
+function(){var T=V.value,ba=oa.length!=T;ba&&this.drive.setUser(oa[T]);this.drive.authorize(ba,mxUtils.bind(this,function(){ba||(oa=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Y){this.handleError(Y)}),!0)}));sa.appendChild(V);sa=new CustomDialog(this,sa,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(sa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=
M.message?H=""==M.message&&null!=M.name?mxUtils.htmlEntities(M.name):mxUtils.htmlEntities(M.message):null!=M.response&&null!=M.response.error?H=mxUtils.htmlEntities(M.response.error):"undefined"!==typeof window.App&&(M.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout")):M.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof M&&0<M.length&&(H=mxUtils.htmlEntities(M)))}var ha=A=null;null!=M&&null!=M.helpLink?(A=mxResources.get("help"),ha=mxUtils.bind(this,
function(){return this.editor.graph.openLink(M.helpLink)})):null!=M&&null!=M.ownerEmail&&(A=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+A+": "+M.ownerEmail+")"),ha=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(M.ownerEmail))}));this.showError(f,H,G,g,ia,null,null,A,ha,null,null,null,u?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,
!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,u,x,A){var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},P=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){H();null!=f&&f()},function(){H();null!=g&&g()},u,x,null,null,null,null,P);this.showDialog(d.container,340,46+P,!0,A);d.init()};EditorUi.prototype.showBanner=function(d,f,g,u){var x=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&
@@ -3510,7 +3509,7 @@ g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxCl
!1)?!1:A}if(A||this.isOffline()){H.href=URL.createObjectURL(u?this.base64ToBlob(d,g):new Blob([d],{type:g}));A?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(M){}}else this.createEchoRequest(d,f,g,u,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,u,x,A){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=
g?"&mime="+g:"")+(null!=x?"&format="+x:"")+(null!=A?"&base64="+A:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(u?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,u=Math.ceil(g/1024),x=Array(u),A=0;A<u;++A){for(var H=1024*A,P=Math.min(H+1024,g),M=Array(P-H),G=0;H<P;++G,++H)M[G]=d[H].charCodeAt(0);x[A]=new Uint8Array(M)}return new Blob(x,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,u,x,A,H,P){A=null!=A?A:!1;H=null!=H?H:"vsdx"!=
x&&(!mxClient.IS_IOS||!navigator.standalone);x=this.getServiceCount(A);isLocalStorage&&x++;var M=4>=x?2:6<x?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,ia){try{if("_blank"==ia)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,u);else if(null!=g&&"text/html"==g.substring(0,9)){var ja=new EmbedDialog(this,d);this.showDialog(ja.container,450,240,!0,!0);ja.init()}else{var ha=window.open("about:blank");null==ha?mxUtils.popup(d,!0):(ha.document.write("<pre>"+mxUtils.htmlEntities(d,
-!1)+"</pre>"),ha.document.close())}else ia==App.MODE_DEVICE||"download"==ia?this.doSaveLocalFile(d,G,g,u,null,P):null!=G&&0<G.length&&this.pickFolder(ia,mxUtils.bind(this,function(ba){try{this.exportFile(d,G,g,u,ia,ba)}catch(oa){this.handleError(oa)}}))}catch(ba){this.handleError(ba)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,A,H,null,1<x,M,d,g,u);A=this.isServices(x)?x>M?390:280:160;this.showDialog(f.container,420,A,!0,!0);f.init()};
+!1)+"</pre>"),ha.document.close())}else ia==App.MODE_DEVICE||"download"==ia?this.doSaveLocalFile(d,G,g,u,null,P):null!=G&&0<G.length&&this.pickFolder(ia,mxUtils.bind(this,function(ca){try{this.exportFile(d,G,g,u,ia,ca)}catch(oa){this.handleError(oa)}}))}catch(ca){this.handleError(ca)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,A,H,null,1<x,M,d,g,u);A=this.isServices(x)?x>M?390:280:160;this.showDialog(f.container,420,A,!0,!0);f.init()};
EditorUi.prototype.openInNewWindow=function(d,f,g){var u=window.open("about:blank");null==u||null==u.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),u.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+d+'"/></html>')):u.document.write("<html>"+d+"</html>"):u.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),u.document.close())};var l=EditorUi.prototype.addChromelessToolbarItems;
EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=d(mxUtils.bind(this,function(u){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=
@@ -3524,12 +3523,12 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(
speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(P){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var M=this.createImageDataUri(P,null,"png");P=document.createElement("img");P.style.maxWidth="140px";P.style.maxHeight="140px";P.style.cursor="pointer";P.style.backgroundColor="white";P.setAttribute("title",mxResources.get("openInNewWindow"));
P.setAttribute("border","0");P.setAttribute("src",M);this.exportDialog.appendChild(P);mxEvent.addListener(P,"click",mxUtils.bind(this,function(){this.openInNewWindow(M.substring(M.indexOf(",")+1),"image/png",!0);x.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(P){this.spinner.stop();this.handleError(P)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",x);document.body.appendChild(this.exportDialog)}mxEvent.consume(u)}),
Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,u,x){this.isLocalFileSave()?this.saveLocalFile(g,d,u,x,f):this.saveRequest(d,f,mxUtils.bind(this,function(A,H){return this.createEchoRequest(g,A,u,x,f,H)}),g,x,u)};EditorUi.prototype.saveRequest=function(d,f,g,u,x,A,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var P=this.getServiceCount(!1);isLocalStorage&&P++;var M=4>=P?2:6<P?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,ia){if("_blank"==
-ia||null!=G&&0<G.length){var ja=g("_blank"==ia?null:G,ia==App.MODE_DEVICE||"download"==ia||null==ia||"_blank"==ia?"0":"1");null!=ja&&(ia==App.MODE_DEVICE||"download"==ia||"_blank"==ia?ja.simulate(document,"_blank"):this.pickFolder(ia,mxUtils.bind(this,function(ha){A=null!=A?A:"pdf"==f?"application/pdf":"image/"+f;if(null!=u)try{this.exportFile(u,G,A,!0,ia,ha)}catch(ba){this.handleError(ba)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ja.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=ja.getStatus()&&299>=ja.getStatus())try{this.exportFile(ja.getText(),G,A,!0,ia,ha)}catch(ba){this.handleError(ba)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(ba){this.spinner.stop();this.handleError(ba)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,H,null,1<P,M,u,A,x);P=this.isServices(P)?4<P?390:280:160;this.showDialog(d.container,420,P,!0,!0);d.init()};EditorUi.prototype.isServices=
-function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,u,x,A){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha,ba){if(this.spinner.spin(document.body,mxResources.get("export")))try{var oa=this.editor.graph.isSelectionEmpty();g=null!=g?g:oa;var sa=f?null:this.editor.graph.background;sa==mxConstants.NONE&&(sa=null);null==sa&&0==f&&(sa=ia?
-this.editor.graph.defaultPageBackgroundColor:"#ffffff");var J=this.editor.graph.getSvg(sa,d,H,P,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ha,ia,ja);u&&this.editor.graph.addSvgShadow(J);var V=this.getBaseFilename()+(x?".drawio":"")+".svg";ba=null!=ba?ba:mxUtils.bind(this,function(Y){this.isLocalFileSave()||Y.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",Y,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
-function(){mxUtils.popup(Y)}))});var T=mxUtils.bind(this,function(Y){this.spinner.stop();x&&Y.setAttribute("content",this.getFileData(!0,null,null,null,g,M,null,null,null,!1));ba(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Y))});this.editor.graph.mathEnabled&&this.editor.addMathCss(J);var ca=mxUtils.bind(this,function(Y){A?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Y,T,this.thumbImageCache)):T(Y)});ha?this.embedFonts(J,
-ca):(this.editor.addFontCss(J),ca(J))}catch(Y){this.handleError(Y)}};EditorUi.prototype.addRadiobox=function(d,f,g,u,x,A,H){return this.addCheckbox(d,g,u,x,A,H,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,u,x,A,H,P){A=null!=A?A:!0;var M=document.createElement("input");M.style.marginRight="8px";M.style.marginTop="16px";M.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();M.id=H;null!=P&&M.setAttribute("name",P);g&&(M.setAttribute("checked","checked"),M.defaultChecked=!0);
+ia||null!=G&&0<G.length){var ja=g("_blank"==ia?null:G,ia==App.MODE_DEVICE||"download"==ia||null==ia||"_blank"==ia?"0":"1");null!=ja&&(ia==App.MODE_DEVICE||"download"==ia||"_blank"==ia?ja.simulate(document,"_blank"):this.pickFolder(ia,mxUtils.bind(this,function(ha){A=null!=A?A:"pdf"==f?"application/pdf":"image/"+f;if(null!=u)try{this.exportFile(u,G,A,!0,ia,ha)}catch(ca){this.handleError(ca)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ja.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=ja.getStatus()&&299>=ja.getStatus())try{this.exportFile(ja.getText(),G,A,!0,ia,ha)}catch(ca){this.handleError(ca)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(ca){this.spinner.stop();this.handleError(ca)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,H,null,1<P,M,u,A,x);P=this.isServices(P)?4<P?390:280:160;this.showDialog(d.container,420,P,!0,!0);d.init()};EditorUi.prototype.isServices=
+function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,u,x,A){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha,ca){if(this.spinner.spin(document.body,mxResources.get("export")))try{var oa=this.editor.graph.isSelectionEmpty();g=null!=g?g:oa;var sa=f?null:this.editor.graph.background;sa==mxConstants.NONE&&(sa=null);null==sa&&0==f&&(sa=ia?
+this.editor.graph.defaultPageBackgroundColor:"#ffffff");var J=this.editor.graph.getSvg(sa,d,H,P,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ha,ia,ja);u&&this.editor.graph.addSvgShadow(J);var V=this.getBaseFilename()+(x?".drawio":"")+".svg";ca=null!=ca?ca:mxUtils.bind(this,function(Y){this.isLocalFileSave()||Y.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",Y,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
+function(){mxUtils.popup(Y)}))});var T=mxUtils.bind(this,function(Y){this.spinner.stop();x&&Y.setAttribute("content",this.getFileData(!0,null,null,null,g,M,null,null,null,!1));ca(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Y))});this.editor.graph.mathEnabled&&this.editor.addMathCss(J);var ba=mxUtils.bind(this,function(Y){A?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Y,T,this.thumbImageCache)):T(Y)});ha?this.embedFonts(J,
+ba):(this.editor.addFontCss(J),ba(J))}catch(Y){this.handleError(Y)}};EditorUi.prototype.addRadiobox=function(d,f,g,u,x,A,H){return this.addCheckbox(d,g,u,x,A,H,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,u,x,A,H,P){A=null!=A?A:!0;var M=document.createElement("input");M.style.marginRight="8px";M.style.marginTop="16px";M.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();M.id=H;null!=P&&M.setAttribute("name",P);g&&(M.setAttribute("checked","checked"),M.defaultChecked=!0);
u&&M.setAttribute("disabled","disabled");A&&(d.appendChild(M),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",H),d.appendChild(g),x||mxUtils.br(d));return M};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var u=this.getCurrentFile(),x="";null!=u&&u.getMode()!=App.MODE_DEVICE&&u.getMode()!=App.MODE_BROWSER&&(x=window.location.href);var A=document.createElement("select");A.style.maxWidth=
"200px";A.style.width="auto";A.style.marginLeft="8px";A.style.marginRight="10px";A.className="geBtn";u=document.createElement("option");u.setAttribute("value","blank");mxUtils.write(u,mxResources.get("makeCopy"));A.appendChild(u);u=document.createElement("option");u.setAttribute("value","custom");mxUtils.write(u,mxResources.get("custom")+"...");A.appendChild(u);d.appendChild(A);mxEvent.addListener(A,"change",mxUtils.bind(this,function(){if("custom"==A.value){var H=new FilenameDialog(this,x,mxResources.get("ok"),
function(P){null!=P?x=P:A.value="blank"},mxResources.get("url"),null,null,null,null,function(){A.value="blank"});this.showDialog(H.container,300,80,!0,!1);H.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===A.value?"_blank":x:null},getEditInput:function(){return g},getEditSelect:function(){return A}}};EditorUi.prototype.addLinkSection=
@@ -3544,57 +3543,57 @@ f&&(g.push("zoom"),ha.resize=!0);P&&g.push("layers");M&&g.push("tags");0<g.lengt
("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,u){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("html"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
x.appendChild(A);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var P=document.createElement("input");P.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";P.setAttribute("value","url");P.setAttribute("type","radio");P.setAttribute("name","type-embedhtmldialog");A=P.cloneNode(!0);A.setAttribute("value","copy");H.appendChild(A);var M=document.createElement("span");mxUtils.write(M,mxResources.get("includeCopyOfMyDiagram"));
H.appendChild(M);mxUtils.br(H);H.appendChild(P);M=document.createElement("span");mxUtils.write(M,mxResources.get("publicDiagramUrl"));H.appendChild(M);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(M=document.createElement("a"),M.style.paddingLeft="12px",M.style.color="gray",M.style.cursor="pointer",mxUtils.write(M,mxResources.get("share")),H.appendChild(M),mxEvent.addListener(M,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));
-A.setAttribute("checked","checked");null==g&&P.setAttribute("disabled","disabled");x.appendChild(H);var ia=this.addLinkSection(x),ja=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var ha=document.createElement("input");ha.setAttribute("type","text");ha.style.marginRight="16px";ha.style.width="60px";ha.style.marginLeft="4px";ha.style.marginRight="12px";ha.value="100%";x.appendChild(ha);var ba=this.addCheckbox(x,mxResources.get("fit"),!0);H=null!=this.pages&&1<this.pages.length;
-var oa=oa=this.addCheckbox(x,mxResources.get("allPages"),H,!H),sa=this.addCheckbox(x,mxResources.get("layers"),!0),J=this.addCheckbox(x,mxResources.get("tags"),!0),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),T=null;H=380;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(x,V);var ca=T.getEditInput();ca.style.marginBottom="16px";H+=50;mxEvent.addListener(V,"change",function(){V.checked?ca.removeAttribute("disabled"):ca.setAttribute("disabled","disabled");ca.checked&&V.checked?T.getEditSelect().removeAttribute("disabled"):
-T.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,x,mxUtils.bind(this,function(){u(P.checked?g:null,ja.checked,ha.value,ia.getTarget(),ia.getColor(),ba.checked,oa.checked,sa.checked,J.checked,V.checked,null!=T?T.getLink():null)}),null,d,f);this.showDialog(d.container,340,H,!0,!0);A.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,u,x,A,H,P){var M=document.createElement("div");M.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,
+A.setAttribute("checked","checked");null==g&&P.setAttribute("disabled","disabled");x.appendChild(H);var ia=this.addLinkSection(x),ja=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");var ha=document.createElement("input");ha.setAttribute("type","text");ha.style.marginRight="16px";ha.style.width="60px";ha.style.marginLeft="4px";ha.style.marginRight="12px";ha.value="100%";x.appendChild(ha);var ca=this.addCheckbox(x,mxResources.get("fit"),!0);H=null!=this.pages&&1<this.pages.length;
+var oa=oa=this.addCheckbox(x,mxResources.get("allPages"),H,!H),sa=this.addCheckbox(x,mxResources.get("layers"),!0),J=this.addCheckbox(x,mxResources.get("tags"),!0),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),T=null;H=380;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(x,V);var ba=T.getEditInput();ba.style.marginBottom="16px";H+=50;mxEvent.addListener(V,"change",function(){V.checked?ba.removeAttribute("disabled"):ba.setAttribute("disabled","disabled");ba.checked&&V.checked?T.getEditSelect().removeAttribute("disabled"):
+T.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,x,mxUtils.bind(this,function(){u(P.checked?g:null,ja.checked,ha.value,ia.getTarget(),ia.getColor(),ca.checked,oa.checked,sa.checked,J.checked,V.checked,null!=T?T.getLink():null)}),null,d,f);this.showDialog(d.container,340,H,!0,!0);A.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,u,x,A,H,P){var M=document.createElement("div");M.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,
d||mxResources.get("publish"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";M.appendChild(G);var ia=this.getCurrentFile();d=0;if(null==ia||ia.constructor!=window.DriveFile||f)H=null!=H?H:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;H=null!=H?H:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
var ja=document.createElement("div");ja.style.whiteSpace="normal";mxUtils.write(ja,mxResources.get("linkAccountRequired"));G.appendChild(ja);ja=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(ia.getId())}));ja.style.marginTop="12px";ja.className="geBtn";G.appendChild(ja);M.appendChild(G);ja=document.createElement("a");ja.style.paddingLeft="12px";ja.style.color="gray";ja.style.fontSize="11px";ja.style.cursor="pointer";mxUtils.write(ja,mxResources.get("check"));
-G.appendChild(ja);mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(p){this.spinner.stop();p=new ErrorDialog(this,null,mxResources.get(null!=p?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(p.container,300,80,!0,!1);p.init()}))}))}var ha=null,ba=null;if(null!=g||null!=u)d+=30,mxUtils.write(M,mxResources.get("width")+":"),ha=document.createElement("input"),
-ha.setAttribute("type","text"),ha.style.marginRight="16px",ha.style.width="50px",ha.style.marginLeft="6px",ha.style.marginRight="16px",ha.style.marginBottom="10px",ha.value="100%",M.appendChild(ha),mxUtils.write(M,mxResources.get("height")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginBottom="10px",ba.value=u+"px",M.appendChild(ba),mxUtils.br(M);var oa=this.addLinkSection(M,A);g=null!=this.pages&&1<this.pages.length;
-var sa=null;if(null==ia||ia.constructor!=window.DriveFile||f)sa=this.addCheckbox(M,mxResources.get("allPages"),g,!g);var J=this.addCheckbox(M,mxResources.get("lightbox"),!0,null,null,!A),V=this.addEditButton(M,J),T=V.getEditInput();A&&(T.style.marginLeft=J.style.marginLeft,J.style.display="none",d-=20);var ca=this.addCheckbox(M,mxResources.get("layers"),!0);ca.style.marginLeft=T.style.marginLeft;ca.style.marginTop="8px";var Y=this.addCheckbox(M,mxResources.get("tags"),!0);Y.style.marginLeft=T.style.marginLeft;
-Y.style.marginBottom="16px";Y.style.marginTop="16px";mxEvent.addListener(J,"change",function(){J.checked?(ca.removeAttribute("disabled"),T.removeAttribute("disabled")):(ca.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));T.checked&&J.checked?V.getEditSelect().removeAttribute("disabled"):V.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,M,mxUtils.bind(this,function(){x(oa.getTarget(),oa.getColor(),null==sa?!0:sa.checked,J.checked,V.getLink(),
-ca.checked,null!=ha?ha.value:null,null!=ba?ba.value:null,Y.checked)}),null,mxResources.get("create"),H,P);this.showDialog(f.container,340,300+d,!0,!0);null!=ha?(ha.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ha.select():document.execCommand("selectAll",!1,null)):oa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,u,x){var A=document.createElement("div");A.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText=
+G.appendChild(ja);mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(p){this.spinner.stop();p=new ErrorDialog(this,null,mxResources.get(null!=p?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(p.container,300,80,!0,!1);p.init()}))}))}var ha=null,ca=null;if(null!=g||null!=u)d+=30,mxUtils.write(M,mxResources.get("width")+":"),ha=document.createElement("input"),
+ha.setAttribute("type","text"),ha.style.marginRight="16px",ha.style.width="50px",ha.style.marginLeft="6px",ha.style.marginRight="16px",ha.style.marginBottom="10px",ha.value="100%",M.appendChild(ha),mxUtils.write(M,mxResources.get("height")+":"),ca=document.createElement("input"),ca.setAttribute("type","text"),ca.style.width="50px",ca.style.marginLeft="6px",ca.style.marginBottom="10px",ca.value=u+"px",M.appendChild(ca),mxUtils.br(M);var oa=this.addLinkSection(M,A);g=null!=this.pages&&1<this.pages.length;
+var sa=null;if(null==ia||ia.constructor!=window.DriveFile||f)sa=this.addCheckbox(M,mxResources.get("allPages"),g,!g);var J=this.addCheckbox(M,mxResources.get("lightbox"),!0,null,null,!A),V=this.addEditButton(M,J),T=V.getEditInput();A&&(T.style.marginLeft=J.style.marginLeft,J.style.display="none",d-=20);var ba=this.addCheckbox(M,mxResources.get("layers"),!0);ba.style.marginLeft=T.style.marginLeft;ba.style.marginTop="8px";var Y=this.addCheckbox(M,mxResources.get("tags"),!0);Y.style.marginLeft=T.style.marginLeft;
+Y.style.marginBottom="16px";Y.style.marginTop="16px";mxEvent.addListener(J,"change",function(){J.checked?(ba.removeAttribute("disabled"),T.removeAttribute("disabled")):(ba.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));T.checked&&J.checked?V.getEditSelect().removeAttribute("disabled"):V.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,M,mxUtils.bind(this,function(){x(oa.getTarget(),oa.getColor(),null==sa?!0:sa.checked,J.checked,V.getLink(),
+ba.checked,null!=ha?ha.value:null,null!=ca?ca.value:null,Y.checked)}),null,mxResources.get("create"),H,P);this.showDialog(f.container,340,300+d,!0,!0);null!=ha?(ha.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ha.select():document.execCommand("selectAll",!1,null)):oa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,u,x){var A=document.createElement("div");A.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:"+(x?"10":"4")+"px";A.appendChild(H);if(x){mxUtils.write(A,mxResources.get("zoom")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value=this.lastExportZoom||"100%";A.appendChild(P);mxUtils.write(A,mxResources.get("borderWidth")+":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight=
"16px";M.style.width="60px";M.style.marginLeft="4px";M.value=this.lastExportBorder||"0";A.appendChild(M);mxUtils.br(A)}var G=this.addCheckbox(A,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ia=u?null:this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var ja=u?null:this.addCheckbox(A,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);null!=ja&&(ja.style.marginBottom="16px");
-d=new CustomDialog(this,A,mxUtils.bind(this,function(){var ha=parseInt(P.value)/100||1,ba=parseInt(M.value)||0;g(!G.checked,null!=ia?ia.checked:!1,null!=ja?ja.checked:!1,ha,ba)}),null,d,f);this.showDialog(d.container,300,(x?25:0)+(u?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,u,x,A,H,P,M){H=null!=H?H:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var ia=this.editor.graph,ja="jpeg"==P?220:300,ha=document.createElement("h3");mxUtils.write(ha,
-d);ha.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ha);mxUtils.write(G,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%";G.appendChild(ba);mxUtils.write(G,mxResources.get("borderWidth")+":");var oa=document.createElement("input");oa.setAttribute("type","text");oa.style.marginRight=
+d=new CustomDialog(this,A,mxUtils.bind(this,function(){var ha=parseInt(P.value)/100||1,ca=parseInt(M.value)||0;g(!G.checked,null!=ia?ia.checked:!1,null!=ja?ja.checked:!1,ha,ca)}),null,d,f);this.showDialog(d.container,300,(x?25:0)+(u?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,u,x,A,H,P,M){H=null!=H?H:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var ia=this.editor.graph,ja="jpeg"==P?220:300,ha=document.createElement("h3");mxUtils.write(ha,
+d);ha.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ha);mxUtils.write(G,mxResources.get("zoom")+":");var ca=document.createElement("input");ca.setAttribute("type","text");ca.style.marginRight="16px";ca.style.width="60px";ca.style.marginLeft="4px";ca.style.marginRight="12px";ca.value=this.lastExportZoom||"100%";G.appendChild(ca);mxUtils.write(G,mxResources.get("borderWidth")+":");var oa=document.createElement("input");oa.setAttribute("type","text");oa.style.marginRight=
"16px";oa.style.width="60px";oa.style.marginLeft="4px";oa.value=this.lastExportBorder||"0";G.appendChild(oa);mxUtils.br(G);var sa=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,ia.isSelectionEmpty()),J=document.createElement("input");J.style.marginTop="16px";J.style.marginRight="8px";J.style.marginLeft="24px";J.setAttribute("disabled","disabled");J.setAttribute("type","checkbox");var V=document.createElement("select");V.style.marginTop="16px";V.style.marginLeft="8px";d=["selectionOnly","diagram",
-"page"];var T={};for(ha=0;ha<d.length;ha++)if(!ia.isSelectionEmpty()||"selectionOnly"!=d[ha]){var ca=document.createElement("option");mxUtils.write(ca,mxResources.get(d[ha]));ca.setAttribute("value",d[ha]);V.appendChild(ca);T[d[ha]]=ca}M?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(V),mxUtils.br(G),ja+=26,mxEvent.addListener(V,"change",function(){"selectionOnly"==V.value&&(sa.checked=!0)})):A&&(G.appendChild(J),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),ja+=30,mxEvent.addListener(sa,
+"page"];var T={};for(ha=0;ha<d.length;ha++)if(!ia.isSelectionEmpty()||"selectionOnly"!=d[ha]){var ba=document.createElement("option");mxUtils.write(ba,mxResources.get(d[ha]));ba.setAttribute("value",d[ha]);V.appendChild(ba);T[d[ha]]=ba}M?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(V),mxUtils.br(G),ja+=26,mxEvent.addListener(V,"change",function(){"selectionOnly"==V.value&&(sa.checked=!0)})):A&&(G.appendChild(J),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),ja+=30,mxEvent.addListener(sa,
"change",function(){sa.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}));ia.isSelectionEmpty()?M&&(sa.style.display="none",sa.nextSibling.style.display="none",sa.nextSibling.nextSibling.style.display="none",ja-=30):(V.value="diagram",J.setAttribute("checked","checked"),J.defaultChecked=!0,mxEvent.addListener(sa,"change",function(){V.value=sa.checked?"selectionOnly":"diagram"}));var Y=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=P),p=
null;Editor.isDarkMode()&&(p=this.addCheckbox(G,mxResources.get("dark"),!0),ja+=26);var E=this.addCheckbox(G,mxResources.get("shadow"),ia.shadowVisible),Q=null;if("png"==P||"jpeg"==P)Q=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ja+=30;var Z=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),H,null,null,"jpeg"!=P);Z.style.marginBottom="16px";var W=document.createElement("input");W.style.marginBottom="16px";W.style.marginRight="8px";W.setAttribute("type",
"checkbox");!this.isOffline()&&this.canvasSupported||W.setAttribute("disabled","disabled");var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginBottom="16px";A=document.createElement("option");A.setAttribute("value","none");mxUtils.write(A,mxResources.get("default"));X.appendChild(A);A=document.createElement("option");A.setAttribute("value","embedFonts");mxUtils.write(A,mxResources.get("embedFonts"));X.appendChild(A);A=document.createElement("option");
A.setAttribute("value","lblToSvg");mxUtils.write(A,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||X.appendChild(A);mxEvent.addListener(X,"change",mxUtils.bind(this,function(){"lblToSvg"==X.value?(W.checked=!0,W.setAttribute("disabled","disabled"),T.page.style.display="none","page"==V.value&&(V.value="diagram"),E.checked=!1,E.setAttribute("disabled","disabled"),la.style.display="inline-block",da.style.display="none"):"disabled"==W.getAttribute("disabled")&&(W.checked=!1,W.removeAttribute("disabled"),
E.removeAttribute("disabled"),T.page.style.display="",la.style.display="none",da.style.display="")}));f&&(G.appendChild(W),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(X),mxUtils.br(G),ja+=60);var da=document.createElement("select");da.style.maxWidth="260px";da.style.marginLeft="8px";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));da.appendChild(f);f=document.createElement("option");
f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));da.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));da.appendChild(f);var la=document.createElement("div");mxUtils.write(la,mxResources.get("LinksLost"));la.style.margin="7px";la.style.display="none";"svg"==P&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(da),G.appendChild(la),mxUtils.br(G),mxUtils.br(G),ja+=50);g=new CustomDialog(this,
-G,mxUtils.bind(this,function(){this.lastExportBorder=oa.value;this.lastExportZoom=ba.value;x(ba.value,Y.checked,!sa.checked,E.checked,Z.checked,W.checked,oa.value,J.checked,!1,da.value,null!=Q?Q.checked:null,null!=p?p.checked:null,V.value,"embedFonts"==X.value,"lblToSvg"==X.value)}),null,g,u);this.showDialog(g.container,340,ja,!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(d,f,g,u,x){var A=document.createElement("div");A.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var P=document.createElement("h3");mxUtils.write(P,f);P.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";A.appendChild(P)}var M=this.addCheckbox(A,mxResources.get("fit"),!0),G=this.addCheckbox(A,mxResources.get("shadow"),H.shadowVisible&&u,!u),ia=this.addCheckbox(A,g),ja=this.addCheckbox(A,mxResources.get("lightbox"),!0),ha=this.addEditButton(A,ja),ba=
-ha.getEditInput(),oa=1<H.model.getChildCount(H.model.getRoot()),sa=this.addCheckbox(A,mxResources.get("layers"),oa,!oa);sa.style.marginLeft=ba.style.marginLeft;sa.style.marginBottom="12px";sa.style.marginTop="8px";mxEvent.addListener(ja,"change",function(){ja.checked?(oa&&sa.removeAttribute("disabled"),ba.removeAttribute("disabled")):(sa.setAttribute("disabled","disabled"),ba.setAttribute("disabled","disabled"));ba.checked&&ja.checked?ha.getEditSelect().removeAttribute("disabled"):ha.getEditSelect().setAttribute("disabled",
-"disabled")});f=new CustomDialog(this,A,mxUtils.bind(this,function(){d(M.checked,G.checked,ia.checked,ja.checked,ha.getLink(),sa.checked)}),null,mxResources.get("embed"),x);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,u,x,A,H,P){function M(ba){var oa=" ",sa="";u&&(oa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=ia?"&page="+ia:"")+(x?"&edit=_blank":"")+(A?"&layers=1":"")+"');}})(this);\"",sa+="cursor:pointer;");d&&(sa+="max-width:100%;");var J="";g&&(J=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');H('<img src="'+ba+'"'+J+(""!=sa?' style="'+sa+'"':"")+oa+"/>")}var G=this.editor.graph.getGraphBounds(),ia=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ba){var oa=u?this.getFileData(!0):
-null;ba=this.createImageDataUri(ba,oa,"png");M(ba)}),null,null,null,mxUtils.bind(this,function(ba){P({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ja="";g&&(ja="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ha=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(u?"1":"0")+ja+"&xml="+encodeURIComponent(f));ha.send(mxUtils.bind(this,function(){200<=
+G,mxUtils.bind(this,function(){this.lastExportBorder=oa.value;this.lastExportZoom=ca.value;x(ca.value,Y.checked,!sa.checked,E.checked,Z.checked,W.checked,oa.value,J.checked,!1,da.value,null!=Q?Q.checked:null,null!=p?p.checked:null,V.value,"embedFonts"==X.value,"lblToSvg"==X.value)}),null,g,u);this.showDialog(g.container,340,ja,!0,!0,null,null,null,null,!0);ca.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=
+function(d,f,g,u,x){var A=document.createElement("div");A.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var P=document.createElement("h3");mxUtils.write(P,f);P.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";A.appendChild(P)}var M=this.addCheckbox(A,mxResources.get("fit"),!0),G=this.addCheckbox(A,mxResources.get("shadow"),H.shadowVisible&&u,!u),ia=this.addCheckbox(A,g),ja=this.addCheckbox(A,mxResources.get("lightbox"),!0),ha=this.addEditButton(A,ja),ca=
+ha.getEditInput(),oa=1<H.model.getChildCount(H.model.getRoot()),sa=this.addCheckbox(A,mxResources.get("layers"),oa,!oa);sa.style.marginLeft=ca.style.marginLeft;sa.style.marginBottom="12px";sa.style.marginTop="8px";mxEvent.addListener(ja,"change",function(){ja.checked?(oa&&sa.removeAttribute("disabled"),ca.removeAttribute("disabled")):(sa.setAttribute("disabled","disabled"),ca.setAttribute("disabled","disabled"));ca.checked&&ja.checked?ha.getEditSelect().removeAttribute("disabled"):ha.getEditSelect().setAttribute("disabled",
+"disabled")});f=new CustomDialog(this,A,mxUtils.bind(this,function(){d(M.checked,G.checked,ia.checked,ja.checked,ha.getLink(),sa.checked)}),null,mxResources.get("embed"),x);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,u,x,A,H,P){function M(ca){var oa=" ",sa="";u&&(oa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=ia?"&page="+ia:"")+(x?"&edit=_blank":"")+(A?"&layers=1":"")+"');}})(this);\"",sa+="cursor:pointer;");d&&(sa+="max-width:100%;");var J="";g&&(J=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');H('<img src="'+ca+'"'+J+(""!=sa?' style="'+sa+'"':"")+oa+"/>")}var G=this.editor.graph.getGraphBounds(),ia=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ca){var oa=u?this.getFileData(!0):
+null;ca=this.createImageDataUri(ca,oa,"png");M(ca)}),null,null,null,mxUtils.bind(this,function(ca){P({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ja="";g&&(ja="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ha=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(u?"1":"0")+ja+"&xml="+encodeURIComponent(f));ha.send(mxUtils.bind(this,function(){200<=
ha.getStatus()&&299>=ha.getStatus()?M("data:image/png;base64,"+ha.getText()):P({message:mxResources.get("unknownError")})}))}else P({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,u,x,A,H){var P=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),M=P.getElementsByTagName("a");if(null!=M)for(var G=0;G<M.length;G++){var ia=M[G].getAttribute("href");null!=ia&&"#"==ia.charAt(0)&&"_blank"==M[G].getAttribute("target")&&M[G].removeAttribute("target")}u&&
P.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(P);if(g){var ja=" ",ha="";u&&(ja="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(x?"&edit=_blank":"")+(A?"&layers=1":
-"")+"');}})(this);\"",ha+="cursor:pointer;");d&&(ha+="max-width:100%;");this.editor.convertImages(P,mxUtils.bind(this,function(ba){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ba))+'"'+(""!=ha?' style="'+ha+'"':"")+ja+"/>")}))}else ha="",u&&(f=this.getSelectedPageIndex(),P.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);\"",ha+="cursor:pointer;");d&&(ha+="max-width:100%;");this.editor.convertImages(P,mxUtils.bind(this,function(ca){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ca))+'"'+(""!=ha?' style="'+ha+'"':"")+ja+"/>")}))}else ha="",u&&(f=this.getSelectedPageIndex(),P.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(x?"&edit=_blank":"")+(A?"&layers=1":"")+"');}}})(this);"),ha+="cursor:pointer;"),d&&(d=parseInt(P.getAttribute("width")),x=parseInt(P.getAttribute("height")),P.setAttribute("viewBox","-0.5 -0.5 "+d+" "+x),ha+="max-width:100%;max-height:"+x+"px;",P.removeAttribute("height")),""!=ha&&P.setAttribute("style",ha),this.editor.addFontCss(P),this.editor.graph.mathEnabled&&this.editor.addMathCss(P),H(mxUtils.getXml(P))};EditorUi.prototype.timeSince=
function(d){d=Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==
d.nodeName)g=d;else if("mxfile"==d.nodeName){var u=d.getElementsByTagName("diagram");if(0<u.length){g=u[0];var x=f.getGlobalVariable;f.getGlobalVariable=function(A){return"page"==A?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==A?1:x.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}u=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(A){}finally{this.editor.graph=u}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
1,g=0;if(null!=d){if(d.hasAttribute("scale")){var u=parseFloat(d.getAttribute("scale"));!isNaN(u)&&0<u&&(f=u)}d.hasAttribute("border")&&(u=parseInt(d.getAttribute("border")),!isNaN(u)&&0<u&&(g=u))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,u,x){try{var A=this.editor.graph,H=null!=A.themes&&"darkTheme"==A.defaultThemeName,P=null;if(null!=g&&0<g.length)A=this.createTemporaryGraph(H?A.getDefaultStylesheet():A.getStylesheet()),document.body.appendChild(A.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
!0),A),P=g;else if(H||null!=this.pages&&this.currentPage!=this.pages[0]){A=this.createTemporaryGraph(H?A.getDefaultStylesheet():A.getStylesheet());var M=A.getGlobalVariable;A.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?A.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&A.setBackgroundImage(G.viewState.backgroundImage);A.getGlobalVariable=function(ia){return"page"==ia?G.getName():"pagenumber"==ia?1:M.apply(this,
arguments)};document.body.appendChild(A.container);A.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ia){try{null==P&&(P=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ja=ia.toDataURL("image/png");ja=Editor.writeGraphModelToPng(ja,"tEXt","mxfile",encodeURIComponent(P));d(ja.substring(ja.lastIndexOf(",")+1));A!=this.editor.graph&&A.container.parentNode.removeChild(A.container)}catch(ha){null!=f&&f(ha)}}),null,null,null,mxUtils.bind(this,function(ia){null!=
-f&&f(ia)}),null,null,u,null,A.shadowVisible,null,A,x,null,null,null,"diagram",null)}catch(ia){null!=f&&f(ia)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha){P=null!=P?P:!0;ia=null!=ia?ia:0;H=null!=M?M:f.background;H==mxConstants.NONE&&(H=null);A=f.getSvg(H,G,ia,null,null,A,null,null,null,f.shadowVisible||ja,null,ha,"diagram");(f.shadowVisible||ja)&&f.addSvgShadow(A,null,null,0==ia);null!=d&&A.setAttribute("content",d);null!=g&&A.setAttribute("resource",g);var ba=mxUtils.bind(this,
-function(oa){oa=(u?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(oa);null!=x&&x(oa);return oa});f.mathEnabled&&this.editor.addMathCss(A);if(null!=x)this.embedFonts(A,mxUtils.bind(this,function(oa){P?this.editor.convertImages(oa,mxUtils.bind(this,function(sa){ba(sa)})):ba(oa)}));else return ba(A)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,
-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(u){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha){M=null!=M?M:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var ba=this.editor.graph.isSelectionEmpty();g=null!=g?g:ba;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(oa){this.spinner.stop();
+f&&f(ia)}),null,null,u,null,A.shadowVisible,null,A,x,null,null,null,"diagram",null)}catch(ia){null!=f&&f(ia)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha){P=null!=P?P:!0;ia=null!=ia?ia:0;H=null!=M?M:f.background;H==mxConstants.NONE&&(H=null);A=f.getSvg(H,G,ia,null,null,A,null,null,null,f.shadowVisible||ja,null,ha,"diagram");(f.shadowVisible||ja)&&f.addSvgShadow(A,null,null,0==ia);null!=d&&A.setAttribute("content",d);null!=g&&A.setAttribute("resource",g);var ca=mxUtils.bind(this,
+function(oa){oa=(u?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(oa);null!=x&&x(oa);return oa});f.mathEnabled&&this.editor.addMathCss(A);if(null!=x)this.embedFonts(A,mxUtils.bind(this,function(oa){P?this.editor.convertImages(oa,mxUtils.bind(this,function(sa){ca(sa)})):ca(oa)}));else return ca(A)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(u){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha){M=null!=M?M:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var ca=this.editor.graph.isSelectionEmpty();g=null!=g?g:ca;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(oa){this.spinner.stop();
try{this.saveCanvas(oa,x?this.getFileData(!0,null,null,null,g,P):null,M,null==this.pages||0==this.pages.length,ia)}catch(sa){this.handleError(sa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(oa){this.spinner.stop();this.handleError(oa)}),null,g,d||1,f,u,null,null,A,H,G,ja,ha)}catch(oa){this.spinner.stop(),this.handleError(oa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,u,x,A,H){f=null!=
f?f:0;g=null!=g?g:0;var P=[];try{var M=this.editor.graph;if(null!=d&&0<d.length){M.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var ia=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=ia&&"mxfile"==ia.nodeName&&null!=this.pages){var ja=ia.getElementsByTagName("diagram");if(1==ja.length&&!A){if(ia=Editor.parseDiagramNode(ja[0]),null!=this.currentPage&&(d[ja[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ha=ja[0].getAttribute("name");null!=
-ha&&""!=ha&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ha))}}else if(0<ja.length){A=[];var ba=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[ja[0].getAttribute("id")]=this.pages[0].getId(),ia=Editor.parseDiagramNode(ja[0]),u=!1,ba=1);for(;ba<ja.length;ba++){var oa=ja[ba].getAttribute("id");ja[ba].removeAttribute("id");var sa=this.updatePageRoot(new DiagramPage(ja[ba]));d[oa]=ja[ba].getAttribute("id");var J=this.pages.length;null==sa.getName()&&sa.setName(mxResources.get("pageWithNumber",
-[J+1]));M.model.execute(new ChangePage(this,sa,sa,J,!0));A.push(sa)}this.updatePageLinks(d,A)}}if(null!=ia&&"mxGraphModel"===ia.nodeName){P=M.importGraphModel(ia,f,g,u);if(null!=P)for(ba=0;ba<P.length;ba++)this.updatePageLinksForCell(d,P[ba]);var V=M.parseBackgroundImage(ia.getAttribute("backgroundImage"));if(null!=V&&null!=V.originalSrc){this.updateBackgroundPageLink(d,V);var T=new ChangePageSetup(this,null,V);T.ignoreColor=!0;M.model.execute(T)}}H&&this.insertHandler(P,null,null,M.defaultVertexStyle,
-M.defaultEdgeStyle,!1,!0)}finally{M.model.endUpdate()}}}catch(ca){if(x)throw ca;this.handleError(ca)}return P};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc=
-"data:page/id,"+g)}}catch(u){}};EditorUi.prototype.updatePageLinksForCell=function(d,f){var g=document.createElement("div"),u=this.editor.graph,x=u.getLinkForCell(f);null!=x&&u.setLinkForCell(f,this.updatePageLink(d,x));if(u.isHtmlLabel(f)){g.innerHTML=u.sanitizeHtml(u.getLabel(f));for(var A=g.getElementsByTagName("a"),H=!1,P=0;P<A.length;P++)x=A[P].getAttribute("href"),null!=x&&(A[P].setAttribute("href",this.updatePageLink(d,x)),H=!0);H&&u.labelChanged(f,g.innerHTML)}for(P=0;P<u.model.getChildCount(f);P++)this.updatePageLinksForCell(d,
+ha&&""!=ha&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ha))}}else if(0<ja.length){A=[];var ca=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[ja[0].getAttribute("id")]=this.pages[0].getId(),ia=Editor.parseDiagramNode(ja[0]),u=!1,ca=1);for(;ca<ja.length;ca++){var oa=ja[ca].getAttribute("id");ja[ca].removeAttribute("id");var sa=this.updatePageRoot(new DiagramPage(ja[ca]));d[oa]=ja[ca].getAttribute("id");var J=this.pages.length;null==sa.getName()&&sa.setName(mxResources.get("pageWithNumber",
+[J+1]));M.model.execute(new ChangePage(this,sa,sa,J,!0));A.push(sa)}this.updatePageLinks(d,A)}}if(null!=ia&&"mxGraphModel"===ia.nodeName){P=M.importGraphModel(ia,f,g,u);if(null!=P)for(ca=0;ca<P.length;ca++)this.updatePageLinksForCell(d,P[ca]);var V=M.parseBackgroundImage(ia.getAttribute("backgroundImage"));if(null!=V&&null!=V.originalSrc){this.updateBackgroundPageLink(d,V);var T=new ChangePageSetup(this,null,V);T.ignoreColor=!0;M.model.execute(T)}}H&&this.insertHandler(P,null,null,M.defaultVertexStyle,
+M.defaultEdgeStyle,!1,!0)}finally{M.model.endUpdate()}}}catch(ba){if(x)throw ba;this.handleError(ba)}return P};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc=
+"data:page/id,"+g)}}catch(u){}};EditorUi.prototype.updatePageLinksForCell=function(d,f){var g=document.createElement("div"),u=this.editor.graph,x=u.getLinkForCell(f);null!=x&&u.setLinkForCell(f,this.updatePageLink(d,x));if(u.isHtmlLabel(f)){g.innerHTML=Graph.sanitizeHtml(u.getLabel(f));for(var A=g.getElementsByTagName("a"),H=!1,P=0;P<A.length;P++)x=A[P].getAttribute("href"),null!=x&&(A[P].setAttribute("href",this.updatePageLink(d,x)),H=!0);H&&u.labelChanged(f,g.innerHTML)}for(P=0;P<u.model.getChildCount(f);P++)this.updatePageLinksForCell(d,
u.model.getChildAt(f,P))};EditorUi.prototype.updatePageLink=function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var u=JSON.parse(f.substring(17));if(null!=u.actions){for(var x=0;x<u.actions.length;x++){var A=u.actions[x];if(null!=A.open&&Graph.isPageLink(A.open)){var H=A.open.substring(A.open.indexOf(",")+1);g=d[H];null!=g?A.open="data:page/id,"+g:null==this.getPageById(H)&&delete A.open}}f=
"data:action/json,"+JSON.stringify(u)}}catch(P){}return f};EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,u,x){u=null!=u?u:d.name;g=null!=g?g:mxUtils.bind(this,function(H){this.handleError(H)});var A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var H=this.isRemoteVisioFormat(u);try{var P="UNKNOWN-VISIO",M=u.lastIndexOf(".");if(0<=M&&M<u.length)P=u.substring(M+
1).toUpperCase();else{var G=u.lastIndexOf("/");0<=G&&G<u.length&&(u=u.substring(G+1))}EditorUi.logEvent({category:P+"-MS-IMPORT-FILE",action:"filename_"+u,label:H?"remote":"local"})}catch(ja){}if(H)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{H=new FormData;H.append("file1",d,u);var ia=new XMLHttpRequest;ia.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(u)?"?stencil=1":
-""));ia.responseType="blob";this.addRemoteServiceSecurityCheck(ia);null!=x&&ia.setRequestHeader("x-convert-custom",x);ia.onreadystatechange=mxUtils.bind(this,function(){if(4==ia.readyState)if(200<=ia.status&&299>=ia.status)try{var ja=ia.response;if("text/xml"==ja.type){var ha=new FileReader;ha.onload=mxUtils.bind(this,function(ba){try{f(ba.target.result)}catch(oa){g({message:mxResources.get("errorLoadingFile")})}});ha.readAsText(ja)}else this.doImportVisio(ja,f,g,u)}catch(ba){g(ba)}else try{""==ia.responseType||
-"text"==ia.responseType?g({message:ia.responseText}):(ha=new FileReader,ha.onload=function(){g({message:JSON.parse(ha.result).Message})},ha.readAsText(ia.response))}catch(ba){g({})}});ia.send(H)}else try{this.doImportVisio(d,f,g,u)}catch(ja){g(ja)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",A))};EditorUi.prototype.importGraphML=
+""));ia.responseType="blob";this.addRemoteServiceSecurityCheck(ia);null!=x&&ia.setRequestHeader("x-convert-custom",x);ia.onreadystatechange=mxUtils.bind(this,function(){if(4==ia.readyState)if(200<=ia.status&&299>=ia.status)try{var ja=ia.response;if("text/xml"==ja.type){var ha=new FileReader;ha.onload=mxUtils.bind(this,function(ca){try{f(ca.target.result)}catch(oa){g({message:mxResources.get("errorLoadingFile")})}});ha.readAsText(ja)}else this.doImportVisio(ja,f,g,u)}catch(ca){g(ca)}else try{""==ia.responseType||
+"text"==ia.responseType?g({message:ia.responseText}):(ha=new FileReader,ha.onload=function(){g({message:JSON.parse(ha.result).Message})},ha.readAsText(ia.response))}catch(ca){g({})}});ia.send(H)}else try{this.doImportVisio(d,f,g,u)}catch(ja){g(ja)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",A))};EditorUi.prototype.importGraphML=
function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(x){this.handleError(x)});var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(x){g(x)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,
function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,
f,g){var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var x=JSON.parse(d);f(LucidImporter.importState(x));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var A=[(new Date).toISOString(),"convertLucidChart",x];null!=x.state&&A.push(JSON.parse(x.state));if(null!=x.svgThumbs)for(var H=0;H<x.svgThumbs.length;H++)A.push(Editor.createSvgDataUri(x.svgThumbs[H]));null!=
@@ -3603,12 +3602,12 @@ function(){mxscript("js/orgchart/mxOrgChartLayout.js",u)})})})}):mxscript("js/ex
H.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var P=mxUtils.parseXml(H).getElementsByTagName("svg");if(0<P.length){var M=parseFloat(P[0].getAttribute("width")),G=parseFloat(P[0].getAttribute("height"));if(isNaN(M)||isNaN(G))try{var ia=P[0].getAttribute("viewBox").split(/\s+/);M=parseFloat(ia[2]);G=parseFloat(ia[3])}catch(ja){M=M||100,G=G||100}g(x.convertDataUri(Editor.createSvgDataUri(H)),M,G)}else u({message:mxResources.get("invalidInput")})}catch(ja){u(ja)}})}catch(H){u(H)}};
"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?A():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",A):mxscript("js/extensions.min.js",A))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,u){function x(P,M,G){c1=P>>2;c2=(P&3)<<4|M>>4;c3=(M&15)<<2|G>>6;c4=G&63;r="";r+=A(c1&63);r+=A(c2&63);r+=A(c3&63);return r+=A(c4&63)}function A(P){if(10>P)return String.fromCharCode(48+P);P-=10;if(26>P)return String.fromCharCode(65+P);P-=26;if(26>P)return String.fromCharCode(97+
P);P-=26;return 0==P?"-":1==P?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(P){r="";for(i=0;i<P.length;i+=3)r=i+2==P.length?r+x(P.charCodeAt(i),P.charCodeAt(i+1),0):i+1==P.length?r+x(P.charCodeAt(i),0,0):r+x(P.charCodeAt(i),P.charCodeAt(i+1),P.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(P){if(200<=this.status&&300>this.status)if("txt"==
-f)g(this.response);else{var M=new FileReader;M.readAsDataURL(this.response);M.onloadend=function(G){var ia=new Image;ia.onload=function(){try{var ja=ia.width,ha=ia.height;if(0==ja&&0==ha){var ba=M.result,oa=ba.indexOf(","),sa=decodeURIComponent(escape(atob(ba.substring(oa+1)))),J=mxUtils.parseXml(sa).getElementsByTagName("svg");0<J.length&&(ja=parseFloat(J[0].getAttribute("width")),ha=parseFloat(J[0].getAttribute("height")))}g(M.result,ja,ha)}catch(V){u(V)}};ia.src=M.result};M.onerror=function(G){u(G)}}else u(P)};
+f)g(this.response);else{var M=new FileReader;M.readAsDataURL(this.response);M.onloadend=function(G){var ia=new Image;ia.onload=function(){try{var ja=ia.width,ha=ia.height;if(0==ja&&0==ha){var ca=M.result,oa=ca.indexOf(","),sa=decodeURIComponent(escape(atob(ca.substring(oa+1)))),J=mxUtils.parseXml(sa).getElementsByTagName("svg");0<J.length&&(ja=parseFloat(J[0].getAttribute("width")),ha=parseFloat(J[0].getAttribute("height")))}g(M.result,ja,ha)}catch(V){u(V)}};ia.src=M.result};M.onerror=function(G){u(G)}}else u(P)};
H.onerror=function(P){u(P)};H.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var u=this.editor.graph,x=null;u.getModel().beginUpdate();try{x=u.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),u.updateCellSize(x,!0)}finally{u.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(d,f,g,u,x,A,H,P){A=null!=A?A:!0;H=null!=H?H:!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(ha){4==ha.readyState&&200<=ha.status&&299>=ha.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ha.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var M=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=
G&&0<G.length)return this.importXml(G,f,g,A,!0,P)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,f,g,A,!0,P);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var ia=this.importXml(G,f,g,A,!0,P);if(0<ia.length)return ia}catch(ha){}this.loadImage(d,
-mxUtils.bind(this,function(ha){if("data:"==d.substring(0,5))this.resizeImage(ha,d,mxUtils.bind(this,function(sa,J,V){M.setSelectionCell(M.insertVertex(null,null,"",M.snap(f),M.snap(g),J,V,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(sa)+";"))}),H,this.maxImageSize);else{var ba=Math.min(1,Math.min(this.maxImageSize/ha.width,this.maxImageSize/ha.height)),oa=Math.round(ha.width*ba);ha=Math.round(ha.height*
-ba);M.setSelectionCell(M.insertVertex(null,null,"",M.snap(f),M.snap(g),oa,ha,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var ha=null;M.getModel().beginUpdate();try{ha=M.insertVertex(M.getDefaultParent(),null,d,M.snap(f),M.snap(g),1,1,"text;"+(u?"html=1;":"")),M.updateCellSize(ha),M.fireEvent(new mxEventObject("textInserted","cells",[ha]))}finally{M.getModel().endUpdate()}M.setSelectionCell(ha)}))}else{d=
+mxUtils.bind(this,function(ha){if("data:"==d.substring(0,5))this.resizeImage(ha,d,mxUtils.bind(this,function(sa,J,V){M.setSelectionCell(M.insertVertex(null,null,"",M.snap(f),M.snap(g),J,V,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(sa)+";"))}),H,this.maxImageSize);else{var ca=Math.min(1,Math.min(this.maxImageSize/ha.width,this.maxImageSize/ha.height)),oa=Math.round(ha.width*ca);ha=Math.round(ha.height*
+ca);M.setSelectionCell(M.insertVertex(null,null,"",M.snap(f),M.snap(g),oa,ha,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var ha=null;M.getModel().beginUpdate();try{ha=M.insertVertex(M.getDefaultParent(),null,d,M.snap(f),M.snap(g),1,1,"text;"+(u?"html=1;":"")),M.updateCellSize(ha),M.fireEvent(new mxEventObject("textInserted","cells",[ha]))}finally{M.getModel().endUpdate()}M.setSelectionCell(ha)}))}else{d=
Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,A,null,P);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(ha){this.editor.graph.setSelectionCells(this.importXml(ha,f,g,A,null,P))}),mxUtils.bind(this,function(ha){this.handleError(ha)}));else{M=this.editor.graph;x=null;M.getModel().beginUpdate();try{x=M.insertVertex(M.getDefaultParent(),null,"",M.snap(f),M.snap(g),1,1,"text;whiteSpace=wrap;"+(u?"html=1;":""));
M.fireEvent(new mxEventObject("textInserted","cells",[x]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");x.value=d;M.updateCellSize(x);if(0<this.maxTextWidth&&x.geometry.width>this.maxTextWidth){var ja=M.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=ja.width;x.geometry.height=ja.height}Graph.isLink(x.value)&&M.setLinkForCell(x,x.value);x.geometry.width+=M.gridSize;x.geometry.height+=
M.gridSize}finally{M.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};
@@ -3617,88 +3616,89 @@ EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"
new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,P){null!=P&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(P)?(H=new Blob([H],{type:"application/octet-stream"}),this.importVisio(H,mxUtils.bind(this,function(M){this.importXml(M,0,0,!0)}),null,P)):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 x=this.dialog,A=x.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=u;A.apply(x,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,f,g){var u=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(A){if(mxUtils.isEmptyObject(A.files))g();else{var H=0,P,M=!1;A.forEach(function(G,ia){G=
ia.name.toLowerCase();"diagram/diagram.xml"==G?(M=!0,ia.async("string").then(function(ja){0==ja.indexOf("<mxfile ")?f(ja):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>H&&(H=G,P=ia))});0<H?P.async("string").then(function(G){(new XMLHttpRequest).upload&&u.isRemoteFileFormat(G,d.name)?u.isOffline()?u.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):u.parseFileData(G,mxUtils.bind(this,function(ia){4==ia.readyState&&(200<=ia.status&&299>=ia.status?f(ia.responseText):
-g())}),d.name):g()}):M||g()}},function(A){g(A)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.importFile=function(d,f,g,u,x,A,H,P,M,G,ia,ja){G=null!=G?G:!0;var ha=!1,ba=null,oa=mxUtils.bind(this,function(sa){var J=null;null!=sa&&"<mxlibrary"==sa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,sa,H)):J=this.importXml(sa,g,u,G,null,null!=ja?mxEvent.isControlDown(ja):null);null!=
-P&&P(J)});"image"==f.substring(0,5)?(M=!1,"image/png"==f.substring(0,9)&&(f=ia?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(ba=this.importXml(f,g,u,G,null,null!=ja?mxEvent.isControlDown(ja):null),M=!0)),M||(f=this.editor.graph,M=d.indexOf(";"),0<M&&(d=d.substring(0,M)+d.substring(d.indexOf(",",M+1))),G&&f.isGridEnabled()&&(g=f.snap(g),u=f.snap(u)),ba=[f.insertVertex(null,null,"",g,u,x,A,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+g())}),d.name):g()}):M||g()}},function(A){g(A)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.importFile=function(d,f,g,u,x,A,H,P,M,G,ia,ja){G=null!=G?G:!0;var ha=!1,ca=null,oa=mxUtils.bind(this,function(sa){var J=null;null!=sa&&"<mxlibrary"==sa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,sa,H)):J=this.importXml(sa,g,u,G,null,null!=ja?mxEvent.isControlDown(ja):null);null!=
+P&&P(J)});"image"==f.substring(0,5)?(M=!1,"image/png"==f.substring(0,9)&&(f=ia?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(ca=this.importXml(f,g,u,G,null,null!=ja?mxEvent.isControlDown(ja):null),M=!0)),M||(f=this.editor.graph,M=d.indexOf(";"),0<M&&(d=d.substring(0,M)+d.substring(d.indexOf(",",M+1))),G&&f.isGridEnabled()&&(g=f.snap(g),u=f.snap(u)),ca=[f.insertVertex(null,null,"",g,u,x,A,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
d+";")])):/(\.*<graphml )/.test(d)?(ha=!0,this.importGraphML(d,oa)):null!=M&&null!=H&&(/(\.v(dx|sdx?))($|\?)/i.test(H)||/(\.vs(x|sx?))($|\?)/i.test(H))?(ha=!0,this.importVisio(M,oa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,H)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ha=!0,x=mxUtils.bind(this,function(sa){4==sa.readyState&&(200<=sa.status&&299>=sa.status?oa(sa.responseText):null!=P&&(P(null),this.showError(mxResources.get("error"),413==
-sa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,x,H):this.parseFile(M,x,H)):0==d.indexOf("PK")&&null!=M?(ha=!0,this.importZipFile(M,oa,mxUtils.bind(this,function(){ba=this.insertTextAt(this.validateFileData(d),g,u,!0,null,G);P(ba)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(ba=this.insertTextAt(this.validateFileData(d),g,u,!0,null,G,null,null!=ja?mxEvent.isControlDown(ja):null));ha||null==P||P(ba);return ba};EditorUi.prototype.importFiles=
-function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha){u=null!=u?u:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var ba=null!=f&&null!=g,oa=!0;f=null!=f?f:0;g=null!=g?g:0;var sa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var J=ia||this.resampleThreshold,V=0;V<d.length;V++)if("image/svg"!==d[V].type.substring(0,9)&&"image/"===d[V].type.substring(0,6)&&d[V].size>J){sa=!0;break}var T=mxUtils.bind(this,function(){var ca=this.editor.graph,Y=ca.gridSize;x=null!=x?x:mxUtils.bind(this,function(X,da,la,pa,ma,qa,za,ya,ra){try{return null!=
-X&&"<mxlibrary"==X.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,za)),null):"atlassian"!=this.getServiceName()&&"1"!=urlParams.embed&&this.isCompatibleString(X)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,X,za,!0)),null):this.importFile(X,da,la,pa,ma,qa,za,ya,ra,ba,ja,ha)}catch(ta){return this.handleError(ta),null}});A=null!=A?A:mxUtils.bind(this,function(X){ca.setSelectionCells(X)});if(this.spinner.spin(document.body,
-mxResources.get("loading")))for(var p=d.length,E=p,Q=[],Z=mxUtils.bind(this,function(X,da){Q[X]=da;if(0==--E){this.spinner.stop();if(null!=P)P(Q);else{var la=[];ca.getModel().beginUpdate();try{for(X=0;X<Q.length;X++){var pa=Q[X]();null!=pa&&(la=la.concat(pa))}}finally{ca.getModel().endUpdate()}}A(la)}}),W=0;W<p;W++)mxUtils.bind(this,function(X){var da=d[X];if(null!=da){var la=new FileReader;la.onload=mxUtils.bind(this,function(pa){if(null==H||H(da))if("image/"==da.type.substring(0,6))if("image/svg"==
+sa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,x,H):this.parseFile(M,x,H)):0==d.indexOf("PK")&&null!=M?(ha=!0,this.importZipFile(M,oa,mxUtils.bind(this,function(){ca=this.insertTextAt(this.validateFileData(d),g,u,!0,null,G);P(ca)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(ca=this.insertTextAt(this.validateFileData(d),g,u,!0,null,G,null,null!=ja?mxEvent.isControlDown(ja):null));ha||null==P||P(ca);return ca};EditorUi.prototype.importFiles=
+function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha){u=null!=u?u:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var ca=null!=f&&null!=g,oa=!0;f=null!=f?f:0;g=null!=g?g:0;var sa=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var J=ia||this.resampleThreshold,V=0;V<d.length;V++)if("image/svg"!==d[V].type.substring(0,9)&&"image/"===d[V].type.substring(0,6)&&d[V].size>J){sa=!0;break}var T=mxUtils.bind(this,function(){var ba=this.editor.graph,Y=ba.gridSize;x=null!=x?x:mxUtils.bind(this,function(X,da,la,pa,ma,qa,za,ya,ra){try{return null!=
+X&&"<mxlibrary"==X.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,za)),null):"atlassian"!=this.getServiceName()&&"1"!=urlParams.embed&&this.isCompatibleString(X)&&1==d.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,X,za,!0)),null):this.importFile(X,da,la,pa,ma,qa,za,ya,ra,ca,ja,ha)}catch(ta){return this.handleError(ta),null}});A=null!=A?A:mxUtils.bind(this,function(X){ba.setSelectionCells(X)});if(this.spinner.spin(document.body,
+mxResources.get("loading")))for(var p=d.length,E=p,Q=[],Z=mxUtils.bind(this,function(X,da){Q[X]=da;if(0==--E){this.spinner.stop();if(null!=P)P(Q);else{var la=[];ba.getModel().beginUpdate();try{for(X=0;X<Q.length;X++){var pa=Q[X]();null!=pa&&(la=la.concat(pa))}}finally{ba.getModel().endUpdate()}}A(la)}}),W=0;W<p;W++)mxUtils.bind(this,function(X){var da=d[X];if(null!=da){var la=new FileReader;la.onload=mxUtils.bind(this,function(pa){if(null==H||H(da))if("image/"==da.type.substring(0,6))if("image/svg"==
da.type.substring(0,9)){var ma=Graph.clipSvgDataUri(pa.target.result),qa=ma.indexOf(",");qa=decodeURIComponent(escape(atob(ma.substring(qa+1))));var za=mxUtils.parseXml(qa);qa=za.getElementsByTagName("svg");if(0<qa.length){qa=qa[0];var ya=ja?null:qa.getAttribute("content");null!=ya&&"<"!=ya.charAt(0)&&"%"!=ya.charAt(0)&&(ya=unescape(window.atob?atob(ya):Base64.decode(ya,!0)));null!=ya&&"%"==ya.charAt(0)&&(ya=decodeURIComponent(ya));null==ya||"<mxfile "!==ya.substring(0,8)&&"<mxGraphModel "!==ya.substring(0,
14)?Z(X,mxUtils.bind(this,function(){try{if(null!=za){var Aa=za.getElementsByTagName("svg");if(0<Aa.length){var Oa=Aa[0],Ka=Oa.getAttribute("width"),Ma=Oa.getAttribute("height");Ka=null!=Ka&&"%"!=Ka.charAt(Ka.length-1)?parseFloat(Ka):NaN;Ma=null!=Ma&&"%"!=Ma.charAt(Ma.length-1)?parseFloat(Ma):NaN;var Ga=Oa.getAttribute("viewBox");if(null==Ga||0==Ga.length)Oa.setAttribute("viewBox","0 0 "+Ka+" "+Ma);else if(isNaN(Ka)||isNaN(Ma)){var Ba=Ga.split(" ");3<Ba.length&&(Ka=parseFloat(Ba[2]),Ma=parseFloat(Ba[3]))}ma=
Editor.createSvgDataUri(mxUtils.getXml(Oa));var cb=Math.min(1,Math.min(u/Math.max(1,Ka)),u/Math.max(1,Ma)),Na=x(ma,da.type,f+X*Y,g+X*Y,Math.max(1,Math.round(Ka*cb)),Math.max(1,Math.round(Ma*cb)),da.name);if(isNaN(Ka)||isNaN(Ma)){var y=new Image;y.onload=mxUtils.bind(this,function(){Ka=Math.max(1,y.width);Ma=Math.max(1,y.height);Na[0].geometry.width=Ka;Na[0].geometry.height=Ma;Oa.setAttribute("viewBox","0 0 "+Ka+" "+Ma);ma=Editor.createSvgDataUri(mxUtils.getXml(Oa));var L=ma.indexOf(";");0<L&&(ma=
-ma.substring(0,L)+ma.substring(ma.indexOf(",",L+1)));ca.setCellStyles("image",ma,[Na[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(Oa))}return Na}}}catch(L){}return null})):Z(X,mxUtils.bind(this,function(){return x(ya,"text/xml",f+X*Y,g+X*Y,0,0,da.name)}))}else Z(X,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==da.type){var ra=ja?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ra&&0<ra.length){var ta=new Image;ta.src=pa.target.result;Z(X,mxUtils.bind(this,
+ma.substring(0,L)+ma.substring(ma.indexOf(",",L+1)));ba.setCellStyles("image",ma,[Na[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(Oa))}return Na}}}catch(L){}return null})):Z(X,mxUtils.bind(this,function(){return x(ya,"text/xml",f+X*Y,g+X*Y,0,0,da.name)}))}else Z(X,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==da.type){var ra=ja?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ra&&0<ra.length){var ta=new Image;ta.src=pa.target.result;Z(X,mxUtils.bind(this,
function(){return x(ra,"text/xml",f+X*Y,g+X*Y,ta.width,ta.height,da.name)}));qa=!0}}qa||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(pa.target.result,mxUtils.bind(this,function(Aa){this.resizeImage(Aa,pa.target.result,mxUtils.bind(this,function(Oa,Ka,
Ma){Z(X,mxUtils.bind(this,function(){if(null!=Oa&&Oa.length<G){var Ga=oa&&this.isResampleImageSize(da.size,ia)?Math.min(1,Math.min(u/Ka,u/Ma)):1;return x(Oa,da.type,f+X*Y,g+X*Y,Math.round(Ka*Ga),Math.round(Ma*Ga),da.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),oa,u,ia,da.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else ma=pa.target.result,x(ma,da.type,f+X*Y,g+X*Y,240,160,da.name,function(Aa){Z(X,
-function(){return Aa})},da)});/(\.v(dx|sdx?))($|\?)/i.test(da.name)||/(\.vs(x|sx?))($|\?)/i.test(da.name)?x(null,da.type,f+X*Y,g+X*Y,240,160,da.name,function(pa){Z(X,function(){return pa})},da):"image"==da.type.substring(0,5)||"application/pdf"==da.type?la.readAsDataURL(da):la.readAsText(da)}})(W)});if(sa){sa=[];for(V=0;V<d.length;V++)sa.push(d[V]);d=sa;this.confirmImageResize(function(ca){oa=ca;T()},M)}else T()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
+function(){return Aa})},da)});/(\.v(dx|sdx?))($|\?)/i.test(da.name)||/(\.vs(x|sx?))($|\?)/i.test(da.name)?x(null,da.type,f+X*Y,g+X*Y,240,160,da.name,function(pa){Z(X,function(){return pa})},da):"image"==da.type.substring(0,5)||"application/pdf"==da.type?la.readAsDataURL(da):la.readAsText(da)}})(W)});if(sa){sa=[];for(V=0;V<d.length;V++)sa.push(d[V]);d=sa;this.confirmImageResize(function(ba){oa=ba;T()},M)}else T()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},u=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,x=function(A,H){if(A||f)mxSettings.setResizeImages(A?H:null),mxSettings.save();g();d(H)};null==u||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(A){x(A,
!0)},function(A){x(A,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):x(!1,u)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var u=new FileReader;u.onload=mxUtils.bind(this,function(){this.parseFileData(u.result,f,g)});u.readAsText(d)};EditorUi.prototype.parseFileData=
function(d,f,g){var u=new XMLHttpRequest;u.open("POST",OPEN_URL);u.setRequestHeader("Content-Type","application/x-www-form-urlencoded");u.onreadystatechange=function(){f(u)};u.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,u,x,A,
-H){x=null!=x?x:this.maxImageSize;var P=Math.max(1,d.width),M=Math.max(1,d.height);if(u&&this.isResampleImageSize(null!=H?H:f.length,A))try{var G=Math.max(P/x,M/x);if(1<G){var ia=Math.round(P/G),ja=Math.round(M/G),ha=document.createElement("canvas");ha.width=ia;ha.height=ja;ha.getContext("2d").drawImage(d,0,0,ia,ja);var ba=ha.toDataURL();if(ba.length<f.length){var oa=document.createElement("canvas");oa.width=ia;oa.height=ja;var sa=oa.toDataURL();ba!==sa&&(f=ba,P=ia,M=ja)}}}catch(J){}g(f,P,M)};EditorUi.prototype.extractGraphModelFromPng=
+H){x=null!=x?x:this.maxImageSize;var P=Math.max(1,d.width),M=Math.max(1,d.height);if(u&&this.isResampleImageSize(null!=H?H:f.length,A))try{var G=Math.max(P/x,M/x);if(1<G){var ia=Math.round(P/G),ja=Math.round(M/G),ha=document.createElement("canvas");ha.width=ia;ha.height=ja;ha.getContext("2d").drawImage(d,0,0,ia,ja);var ca=ha.toDataURL();if(ca.length<f.length){var oa=document.createElement("canvas");oa.width=ia;oa.height=ja;var sa=oa.toDataURL();ca!==sa&&(f=ca,P=ia,M=ja)}}}catch(J){}g(f,P,M)};EditorUi.prototype.extractGraphModelFromPng=
function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var u=new Image;u.onload=function(){u.width=0<u.width?u.width:120;u.height=0<u.height?u.height:120;f(u)};null!=g&&(u.onerror=g);u.src=d}catch(x){if(null!=g)g(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var B=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=
mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(J){var V=J.getEvent();
-return null==J.getState()&&!mxEvent.isMouseEvent(V)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(V)&&(null==J.getState()||mxEvent.isControlDown(V)||mxEvent.isShiftDown(V))});f.cellEditor.editPlantUmlData=function(J,V,T){var ca=JSON.parse(T);V=new TextareaDialog(d,mxResources.get("plantUml")+":",ca.data,function(Y){null!=Y&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(Y,ca.format,function(p,E,Q){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==ca.format)f.labelChanged(J,
-"<pre>"+p+"</pre>"),f.updateCellSize(J,!0);else{f.setCellStyles("image",d.convertDataUri(p),[J]);var Z=f.model.getGeometry(J);null!=Z&&(Z=Z.clone(),Z.width=E,Z.height=Q,f.cellsResized([J],[Z],!1))}f.setAttributeForCell(J,"plantUmlData",JSON.stringify({data:Y,format:ca.format}))}finally{f.getModel().endUpdate()}},function(p){d.handleError(p)})},null,null,400,220);d.showDialog(V.container,420,300,!0,!0);V.init()};f.cellEditor.editMermaidData=function(J,V,T){var ca=JSON.parse(T);V=new TextareaDialog(d,
-mxResources.get("mermaid")+":",ca.data,function(Y){null!=Y&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(Y,ca.config,function(p,E,Q){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",p,[J]);var Z=f.model.getGeometry(J);null!=Z&&(Z=Z.clone(),Z.width=Math.max(Z.width,E),Z.height=Math.max(Z.height,Q),f.cellsResized([J],[Z],!1));f.setAttributeForCell(J,"mermaidData",JSON.stringify({data:Y,config:ca.config},null,2))}finally{f.getModel().endUpdate()}},
-function(p){d.handleError(p)})},null,null,400,220);d.showDialog(V.container,420,300,!0,!0);V.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(J,V){try{var T=this.graph.getAttributeForCell(J,"plantUmlData");if(null!=T)this.editPlantUmlData(J,V,T);else if(T=this.graph.getAttributeForCell(J,"mermaidData"),null!=T)this.editMermaidData(J,V,T);else{var ca=f.getCellStyle(J);"1"==mxUtils.getValue(ca,"metaEdit","0")?d.showDataDialog(J):g.apply(this,arguments)}}catch(Y){d.handleError(Y)}};
+return null==J.getState()&&!mxEvent.isMouseEvent(V)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(V)&&(null==J.getState()||mxEvent.isControlDown(V)||mxEvent.isShiftDown(V))});f.cellEditor.editPlantUmlData=function(J,V,T){var ba=JSON.parse(T);V=new TextareaDialog(d,mxResources.get("plantUml")+":",ba.data,function(Y){null!=Y&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(Y,ba.format,function(p,E,Q){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==ba.format)f.labelChanged(J,
+"<pre>"+p+"</pre>"),f.updateCellSize(J,!0);else{f.setCellStyles("image",d.convertDataUri(p),[J]);var Z=f.model.getGeometry(J);null!=Z&&(Z=Z.clone(),Z.width=E,Z.height=Q,f.cellsResized([J],[Z],!1))}f.setAttributeForCell(J,"plantUmlData",JSON.stringify({data:Y,format:ba.format}))}finally{f.getModel().endUpdate()}},function(p){d.handleError(p)})},null,null,400,220);d.showDialog(V.container,420,300,!0,!0);V.init()};f.cellEditor.editMermaidData=function(J,V,T){var ba=JSON.parse(T);V=new TextareaDialog(d,
+mxResources.get("mermaid")+":",ba.data,function(Y){null!=Y&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(Y,ba.config,function(p,E,Q){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",p,[J]);var Z=f.model.getGeometry(J);null!=Z&&(Z=Z.clone(),Z.width=Math.max(Z.width,E),Z.height=Math.max(Z.height,Q),f.cellsResized([J],[Z],!1));f.setAttributeForCell(J,"mermaidData",JSON.stringify({data:Y,config:ba.config},null,2))}finally{f.getModel().endUpdate()}},
+function(p){d.handleError(p)})},null,null,400,220);d.showDialog(V.container,420,300,!0,!0);V.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(J,V){try{var T=this.graph.getAttributeForCell(J,"plantUmlData");if(null!=T)this.editPlantUmlData(J,V,T);else if(T=this.graph.getAttributeForCell(J,"mermaidData"),null!=T)this.editMermaidData(J,V,T);else{var ba=f.getCellStyle(J);"1"==mxUtils.getValue(ba,"metaEdit","0")?d.showDataDialog(J):g.apply(this,arguments)}}catch(Y){d.handleError(Y)}};
f.getLinkTitle=function(J){return d.getLinkTitle(J)};f.customLinkClicked=function(J){var V=!1;try{d.handleCustomLink(J),V=!0}catch(T){d.handleError(T)}return V};var u=f.parseBackgroundImage;f.parseBackgroundImage=function(J){var V=u.apply(this,arguments);null!=V&&null!=V.src&&Graph.isPageLink(V.src)&&(V={originalSrc:V.src});return V};var x=f.setBackgroundImage;f.setBackgroundImage=function(J){null!=J&&null!=J.originalSrc&&(J=d.createImageForPageLink(J.originalSrc,d.currentPage,this));x.apply(this,
arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(J,V){J=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=J){var T=J.indexOf(",");if(0<T)for(J=J.substring(T+1),V=V.getProperty("patches"),T=0;T<V.length;T++)if(null!=V[T][EditorUi.DIFF_UPDATE]&&null!=V[T][EditorUi.DIFF_UPDATE][J]||
-null!=V[T][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(V[T][EditorUi.DIFF_REMOVE],J)){f.refreshBackgroundImage();break}}}));var A=f.getBackgroundImageObject;f.getBackgroundImageObject=function(J,V){var T=A.apply(this,arguments);if(null!=T&&null!=T.originalSrc)if(!V)T={src:T.originalSrc};else if(V&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ca=this.stylesheet,Y=this.shapeForegroundColor,p=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor=
-"#ffffff";this.shapeForegroundColor="#000000";T=d.createImageForPageLink(T.originalSrc);this.shapeBackgroundColor=p;this.shapeForegroundColor=Y;this.stylesheet=ca}return T};var H=this.clearDefaultStyle;this.clearDefaultStyle=function(){H.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl=
-"https://app.diagrams.net/";var P=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(J){J=null!=J?J:"";"1"==urlParams.dev&&(J+=(0<J.length?"&":"?")+"dev=1");return P.apply(this,arguments)};var M=f.addClickHandler;f.addClickHandler=function(J,V,T){var ca=V;V=function(Y,p){if(null==p){var E=mxEvent.getSource(Y);"a"==E.nodeName.toLowerCase()&&(p=E.getAttribute("href"))}null!=p&&f.isCustomLink(p)&&(mxEvent.isTouchEvent(Y)||!mxEvent.isPopupTrigger(Y))&&f.customLinkClicked(p)&&mxEvent.consume(Y);
-null!=ca&&ca(Y,p)};M.call(this,J,V,T)};B.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(J,V,T){d.editor.graph.isSelectionEmpty()?(G.apply(this,arguments),d.menus.addMenuItems(J,["-","copyAsImage"],null,T)):(this.isShowCellEditItems()&&this.addMenuItems(J,["delete","-"],null,T),this.addMenuItems(J,"cut copy copyAsImage duplicate - lockUnlock".split(" "),
-null,T))};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var ia=f.getExportVariables;f.getExportVariables=
-function(){var J=ia.apply(this,arguments),V=d.getCurrentFile();null!=V&&(J.filename=V.getTitle());J.pagecount=null!=d.pages?d.pages.length:1;J.page=null!=d.currentPage?d.currentPage.getName():"";J.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return J};var ja=f.getGlobalVariable;f.getGlobalVariable=function(J){var V=d.getCurrentFile();return"filename"==J&&null!=V?V.getTitle():"page"==J&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==J?null!=d.currentPage&&
-null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==J?null!=d.pages?d.pages.length:1:ja.apply(this,arguments)};var ha=f.labelLinkClicked;f.labelLinkClicked=function(J,V,T){var ca=V.getAttribute("href");if(null==ca||!f.isCustomLink(ca)||!mxEvent.isTouchEvent(T)&&mxEvent.isPopupTrigger(T))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=J&&f.isCellLocked(J.cell))f.customLinkClicked(ca),f.getRubberband().reset();mxEvent.consume(T)}};this.editor.getOrCreateFilename=function(){var J=
-d.defaultFilename,V=d.getCurrentFile();null!=V&&(J=null!=V.getTitle()?V.getTitle():J);return J};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(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",
-!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",
-mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(J){var V=f.cellEditor.text2,T=null;null!=V&&(mxEvent.addListener(V,"dragleave",function(ca){null!=T&&(T.parentNode.removeChild(T),T=null);ca.stopPropagation();ca.preventDefault()}),mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(ca){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=this.highlightElement(V));
-ca.stopPropagation();ca.preventDefault()})),mxEvent.addListener(V,"drop",mxUtils.bind(this,function(ca){null!=T&&(T.parentNode.removeChild(T),T=null);if(0<ca.dataTransfer.files.length)this.importFiles(ca.dataTransfer.files,0,0,this.maxImageSize,function(p,E,Q,Z,W,X){f.insertImage(p,W,X)},function(){},function(p){return"image/"==p.type.substring(0,6)},function(p){for(var E=0;E<p.length;E++)p[E]()},mxEvent.isControlDown(ca));else if(0<=mxUtils.indexOf(ca.dataTransfer.types,"text/uri-list")){var Y=ca.dataTransfer.getData("text/uri-list");
-/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Y)?this.loadImage(decodeURIComponent(Y),mxUtils.bind(this,function(p){var E=Math.max(1,p.width);p=Math.max(1,p.height);var Q=this.maxImageSize;Q=Math.min(1,Math.min(Q/Math.max(1,E)),Q/Math.max(1,p));f.insertImage(decodeURIComponent(Y),E*Q,p*Q)})):document.execCommand("insertHTML",!1,ca.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ca.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ca.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ca.dataTransfer.types,
-"text/plain")&&document.execCommand("insertHTML",!1,ca.dataTransfer.getData("text/plain"));ca.stopPropagation();ca.preventDefault()})))}));this.isSettingsEnabled()&&(ba=this.editor.graph.view,ba.setUnit(mxSettings.getUnit()),ba.addListener("unitChanged",function(J,V){mxSettings.setUnit(V.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,
-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(J,V){0<this.editor.graph.getSelectionCount()?(J=this.editor.graph.getSelectionCell(),J=this.editor.graph.getModel().getStyle(J),this.styleInput.value=J||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var oa=this.isSelectionAllowed;this.isSelectionAllowed=function(J){return mxEvent.getSource(J)==this.styleInput?
-!0:oa.apply(this,arguments)}}ba=document.getElementById("geInfo");null!=ba&&ba.parentNode.removeChild(ba);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var sa=null;mxEvent.addListener(f.container,"dragleave",function(J){f.isEnabled()&&(null!=sa&&(sa.parentNode.removeChild(sa),sa=null),J.stopPropagation(),J.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(J){null==sa&&(!mxClient.IS_IE||10<document.documentMode)&&(sa=this.highlightElement(f.container));
-null!=this.sidebar&&this.sidebar.hideTooltip();J.stopPropagation();J.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(J){null!=sa&&(sa.parentNode.removeChild(sa),sa=null);if(f.isEnabled()){var V=mxUtils.convertPoint(f.container,mxEvent.getClientX(J),mxEvent.getClientY(J)),T=J.dataTransfer.files,ca=f.view.translate,Y=f.view.scale,p=V.x/Y-ca.x,E=V.y/Y-ca.y;if(0<T.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(J)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&
-this.fileLoaded(null),this.openFiles(T,!0)):(mxEvent.isAltDown(J)&&(E=p=null),this.importFiles(T,p,E,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(J),null,null,mxEvent.isShiftDown(J),J));else{mxEvent.isAltDown(J)&&(E=p=0);var Q=0<=mxUtils.indexOf(J.dataTransfer.types,"text/uri-list")?J.dataTransfer.getData("text/uri-list"):null;V=this.extractGraphModelFromEvent(J,null!=this.pages);if(null!=V)f.setSelectionCells(this.importXml(V,p,E,!0));else if(0<=mxUtils.indexOf(J.dataTransfer.types,
-"text/html")){var Z=J.dataTransfer.getData("text/html");V=document.createElement("div");V.innerHTML=f.sanitizeHtml(Z);var W=null;T=V.getElementsByTagName("img");null!=T&&1==T.length?(Z=T[0].getAttribute("src"),null==Z&&(Z=T[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Z)||(W=!0)):(T=V.getElementsByTagName("a"),null!=T&&1==T.length?Z=T[0].getAttribute("href"):(V=V.getElementsByTagName("pre"),null!=V&&1==V.length&&(Z=mxUtils.getTextContent(V[0]))));var X=!0,da=mxUtils.bind(this,
-function(){f.setSelectionCells(this.insertTextAt(Z,p,E,!0,W,null,X,mxEvent.isControlDown(J)))});W&&null!=Z&&Z.length>this.resampleThreshold?this.confirmImageResize(function(la){X=la;da()},mxEvent.isControlDown(J)):da()}else null!=Q&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Q)?this.loadImage(decodeURIComponent(Q),mxUtils.bind(this,function(la){var pa=Math.max(1,la.width);la=Math.max(1,la.height);var ma=this.maxImageSize;ma=Math.min(1,Math.min(ma/Math.max(1,pa)),ma/Math.max(1,la));f.setSelectionCell(f.insertVertex(null,
-null,"",p,E,pa*ma,la*ma,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+Q+";"))}),mxUtils.bind(this,function(la){f.setSelectionCells(this.insertTextAt(Q,p,E,!0))})):0<=mxUtils.indexOf(J.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(J.dataTransfer.getData("text/plain"),p,E,!0))}}J.stopPropagation();J.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
-ba=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",ba);this.addListener("sketchModeChanged",ba);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.refresh()}));f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);
-else{var J=parseInt(this.div.offsetLeft),V=parseInt(this.div.offsetWidth),T=d.embedViewport.x+d.embedViewport.width,ca=parseInt(this.div.offsetTop),Y=parseInt(this.div.offsetHeight),p=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(J,T-V))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(ca,p-Y))+"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("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme)ba=Editor.currentTheme,Editor.currentTheme="",this.doSetCurrentTheme(ba,0,mxUtils.bind(this,function(){"1"==urlParams.embedInline&&this.initializeInlineEmbedMode()}));mxClient.IS_IE||mxClient.IS_IE11||"0"==urlParams.dark||"atlas"==Editor.currentTheme||"1"==urlParams.embed&&"1"!=urlParams.dark||(ba=!1,window.matchMedia&&this.isAutoDarkMode()?ba=window.matchMedia("(prefers-color-scheme: dark)").matches:
-this.isSettingsEnabled()&&!0===mxSettings.settings.darkMode&&(ba=!0),(ba||"dark"==uiTheme||"1"==urlParams.dark)&&this.setDarkMode(!0));if(window.matchMedia)try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(J){this.isAutoDarkMode()&&this.setDarkMode(J.matches)}))}catch(J){}else this.isSettingsEnabled()&&!0===mxSettings.settings.darkMode&&(ba=!0);this.installSettings();"1"==urlParams.prefetchFonts&&d.editor.loadFonts()};EditorUi.prototype.initializeInlineEmbedMode=
-function(){var d=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,g=this.sketchPickerMenuElt,u=this.editor.graph;g.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(G){mxEvent.getSource(G)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(G),mxEvent.getClientY(G)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width=
-"10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background="#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);this.bottomResizer=x;var A=null,H=null,P=null,M=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(G){M=parseInt(this.diagramContainer.style.height);H=mxEvent.getClientY(G);u.popupMenuHandler.hideMenu();mxEvent.consume(G)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);
-this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(G){P=parseInt(this.diagramContainer.style.width);A=mxEvent.getClientX(G);u.popupMenuHandler.hideMenu();mxEvent.consume(G)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(G){var ia=!1;null!=A&&(this.diagramContainer.style.width=Math.max(20,P+mxEvent.getClientX(G)-A)+"px",ia=!0);null!=H&&(this.diagramContainer.style.height=Math.max(20,M+mxEvent.getClientY(G)-H)+"px",ia=!0);ia&&((window.opener||
-window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(G){null==A&&null==H||mxEvent.consume(G);H=A=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";d.style.visibility="hidden";g.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(G){this.inlineSizeChanged();this.fitWindows()}));this.addListener("darkModeChanged",mxUtils.bind(this,function(G){this.inlineSizeChanged()}));this.addListener("editInlineStop",mxUtils.bind(this,function(G){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=
-"hidden";f.style.visibility="hidden";d.style.visibility="hidden";g.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(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,u=!1,x=0;x<g.types.length;x++)if("text/"===g.types[x].substring(0,5)){u=!0;break}if(!u){var A=
-g.items;for(index in A){var H=A[index];if("file"===H.kind){if(d.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,function(M,G,ia,ja,ha,ba){d.insertImage(M,ha,ba)},function(){},function(M){return"image/"==M.type.substring(0,6)},function(M){for(var G=0;G<M.length;G++)M[G]()});else{var P=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],P.x,P.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(M){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML=
-"&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow=
-"hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var u=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(A){var H=mxEvent.getSource(A);null==f.container||!f.isEnabled()||f.isMouseDown||
-f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||224!=A.keyCode&&(mxClient.IS_MAC||17!=A.keyCode)&&(!mxClient.IS_MAC||91!=A.keyCode&&93!=A.keyCode)||u||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",A=f.container.scrollLeft,H=f.container.scrollTop,f.container.appendChild(g),u=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=A,f.container.scrollTop=H)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,
-function(A){var H=A.keyCode;window.setTimeout(mxUtils.bind(this,function(){!u||224!=H&&17!=H&&91!=H&&93!=H||(u=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(A){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(A){if(f.isEnabled())try{mxClipboard.copy(f),
-this.copyCells(g,!0),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(A){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=A.clipboardData&&this.pasteCells(A,g,!0,!0),!mxEvent.isConsumed(A))){var H=f.container.scrollLeft,P=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=H;f.container.scrollTop=P;this.pasteCells(A,g,!1,!0)}),0)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=
-function(A){return mxEvent.getSource(A)==g?!0:x.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){d=null!=d?d:Editor.currentTheme;return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,f,g){function u(M){return"simple"==M||0==f&&"sketch"==M}f=null!=f?f:100;var x=Editor.currentTheme,
-A=u(x)&&this.isDefaultTheme(d)||this.isDefaultTheme(x)&&u(d),H=A&&"sketch"!=d&&"sketch"!=x;if(A&&!this.themeSwitching){Editor.currentTheme=d;this.themeSwitching=!0;var P=this.saveScrollState();mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms");0==f&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){u(x)&&this.isDefaultTheme(d)?(null!=this.sidebarFooterContainer&&(this.sidebarFooterContainer.style.display=
-"block"),this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):this.isDefaultTheme(x)&&u(d)&&(null!=this.sidebarFooterContainer&&(this.sidebarFooterContainer.style.display="none"),this.menubarContainer.style.display="none",this.toolbarContainer.style.display=
-"none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();this.restoreScrollState(P);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",
-null);delete this.themeSwitching;null!=g&&g()}),f)}),f)}),f)}),0)}return H};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));
-var g=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var u=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=u&&null!=u.getAttribute("class");if(!f&&null!=u){u=u.getAttribute("title");var x=this.getCurrentFile();x=null!=x?x.savingStatusKey:DrawioFile.prototype.savingStatusKey;u==mxResources.get(x)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(x))+
-'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";u=32>=d.clientWidth;d.style.visibility=u&&""==this.editor.getStatus()?"hidden":"";if(u||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",g);
-g()};EditorUi.prototype.switchTheme=function(d){this.isDefaultTheme(d)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,
-this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);this.createPickerMenuForTheme(d);this.createMainMenuForTheme(d);this.createMenubarForTheme(d);this.createFooterMenuForTheme(d);this.sidebarContainer.style.display="";if("simple"==d||"sketch"==d)this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width=
-"",this.formatContainer.style.zIndex="",this.formatContainer.style.border="none",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="63px",this.sidebarContainer.style.width="100%";null!=this.format&&(d=this.isDefaultTheme(d)||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};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(),f=0;f<d.length;f++)null!=d[f]&&d[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var d=this.getWindows(),f=0;f<d.length;f++)null!=d[f]&&d[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=
-function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.tagsWindow&&
-(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(d){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=
-Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=d&&"sketch"!=d);"simple"==d||"sketch"==d?(mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,
-10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),f.defaultEdgeLength=120,null==urlParams.grid&&(f.defaultGridEnabled=!1),null==urlParams.pv&&(f.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};
-EditorUi.prototype.switchCssForTheme=function(d){"simple"==d||"sketch"==d?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"simple"==
-d||"sketch"==d?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};
-EditorUi.prototype.createMainMenuForTheme=function(d){"simple"!=d&&"sketch"!=d||null!=this.sketchMainMenuElt||(this.sketchMainMenuElt=document.createElement("div"),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",this.sketchMainMenuElt.appendChild(this.createMenu("diagram",
-Editor.menuImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage)),this.sketchWrapperElt.appendChild(this.sketchMainMenuElt))};EditorUi.prototype.createFooterMenuForTheme=function(d){if(("simple"==d||"sketch"==d)&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className=
+null!=V[T][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(V[T][EditorUi.DIFF_REMOVE],J)){f.refreshBackgroundImage();break}}}));var A=f.getBackgroundImageObject;f.getBackgroundImageObject=function(J,V){var T=A.apply(this,arguments);if(null!=T&&null!=T.originalSrc)if(!V)T={src:T.originalSrc};else if(V&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ba=this.stylesheet,Y=this.shapeForegroundColor,p=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor=
+"#ffffff";this.shapeForegroundColor="#000000";T=d.createImageForPageLink(T.originalSrc);this.shapeBackgroundColor=p;this.shapeForegroundColor=Y;this.stylesheet=ba}return T};var H=this.clearDefaultStyle;this.clearDefaultStyle=function(){H.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl=
+"https://app.diagrams.net/";var P=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(J){J=null!=J?J:"";"1"==urlParams.dev&&(J+=(0<J.length?"&":"?")+"dev=1");return P.apply(this,arguments)};var M=f.addClickHandler;f.addClickHandler=function(J,V,T){var ba=V;V=function(Y,p){if(null==p){var E=mxEvent.getSource(Y);"a"==E.nodeName.toLowerCase()&&(p=E.getAttribute("href"))}null!=p&&f.isCustomLink(p)&&(mxEvent.isTouchEvent(Y)||!mxEvent.isPopupTrigger(Y))&&f.customLinkClicked(p)&&mxEvent.consume(Y);
+null!=ba&&ba(Y,p)};M.call(this,J,V,T)};B.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(J,V,T){if(d.editor.graph.isSelectionEmpty())G.apply(this,arguments),d.menus.addMenuItems(J,["-","copyAsImage"],null,T);else if(this.isShowCellEditItems()?this.addMenuItems(J,["delete","-"],null,T):this.addPopupMenuArrangeItems(J,V,T),this.addMenuItems(J,
+"- cut copy copyAsImage duplicate lockUnlock".split(" "),null,T),!this.isShowCellEditItems()&&1==f.getSelectionCount()&&f.isCellEditable(V)&&f.getModel().isVertex(V)){var ba=f.view.getState(V);null!=ba&&null!=mxUtils.getValue(ba.style,mxConstants.STYLE_IMAGE,null)&&(J.addSeparator(),this.addMenuItem(J,"crop",null,T))}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;
+this.menus.isShowCellEditItems=this.menus.isShowStyleItems}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var ia=f.getExportVariables;f.getExportVariables=function(){var J=ia.apply(this,arguments),V=d.getCurrentFile();null!=V&&(J.filename=V.getTitle());J.pagecount=null!=d.pages?d.pages.length:1;J.page=null!=d.currentPage?d.currentPage.getName():"";J.pagenumber=
+null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return J};var ja=f.getGlobalVariable;f.getGlobalVariable=function(J){var V=d.getCurrentFile();return"filename"==J&&null!=V?V.getTitle():"page"==J&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==J?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==J?null!=d.pages?d.pages.length:1:ja.apply(this,arguments)};var ha=f.labelLinkClicked;f.labelLinkClicked=function(J,V,T){var ba=
+V.getAttribute("href");if(null==ba||!f.isCustomLink(ba)||!mxEvent.isTouchEvent(T)&&mxEvent.isPopupTrigger(T))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=J&&f.isCellLocked(J.cell))f.customLinkClicked(ba),f.getRubberband().reset();mxEvent.consume(T)}};this.editor.getOrCreateFilename=function(){var J=d.defaultFilename,V=d.getCurrentFile();null!=V&&(J=null!=V.getTitle()?V.getTitle():J);return J};var ca=this.actions.get("print");ca.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ca.visible=
+ca.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,
+!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(J){var V=
+f.cellEditor.text2,T=null;null!=V&&(mxEvent.addListener(V,"dragleave",function(ba){null!=T&&(T.parentNode.removeChild(T),T=null);ba.stopPropagation();ba.preventDefault()}),mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(ba){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=this.highlightElement(V));ba.stopPropagation();ba.preventDefault()})),mxEvent.addListener(V,"drop",mxUtils.bind(this,function(ba){null!=T&&(T.parentNode.removeChild(T),T=null);if(0<ba.dataTransfer.files.length)this.importFiles(ba.dataTransfer.files,
+0,0,this.maxImageSize,function(p,E,Q,Z,W,X){f.insertImage(p,W,X)},function(){},function(p){return"image/"==p.type.substring(0,6)},function(p){for(var E=0;E<p.length;E++)p[E]()},mxEvent.isControlDown(ba));else if(0<=mxUtils.indexOf(ba.dataTransfer.types,"text/uri-list")){var Y=ba.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Y)?this.loadImage(decodeURIComponent(Y),mxUtils.bind(this,function(p){var E=Math.max(1,p.width);p=Math.max(1,p.height);var Q=this.maxImageSize;Q=
+Math.min(1,Math.min(Q/Math.max(1,E)),Q/Math.max(1,p));f.insertImage(decodeURIComponent(Y),E*Q,p*Q)})):document.execCommand("insertHTML",!1,ba.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ba.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ba.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ba.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,ba.dataTransfer.getData("text/plain"));ba.stopPropagation();ba.preventDefault()})))}));this.isSettingsEnabled()&&
+(ca=this.editor.graph.view,ca.setUnit(mxSettings.getUnit()),ca.addListener("unitChanged",function(J,V){mxSettings.setUnit(V.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ca.unit),this.refresh());if("1"==urlParams.styledev){ca=document.getElementById("geFooter");null!=ca&&(this.styleInput=document.createElement("input"),
+this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),ca.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+mxUtils.bind(this,function(J,V){0<this.editor.graph.getSelectionCount()?(J=this.editor.graph.getSelectionCell(),J=this.editor.graph.getModel().getStyle(J),this.styleInput.value=J||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var oa=this.isSelectionAllowed;this.isSelectionAllowed=function(J){return mxEvent.getSource(J)==this.styleInput?!0:oa.apply(this,arguments)}}ca=document.getElementById("geInfo");null!=ca&&ca.parentNode.removeChild(ca);if(Graph.fileSupport&&
+(!this.editor.chromeless||this.editor.editable)){var sa=null;mxEvent.addListener(f.container,"dragleave",function(J){f.isEnabled()&&(null!=sa&&(sa.parentNode.removeChild(sa),sa=null),J.stopPropagation(),J.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(J){null==sa&&(!mxClient.IS_IE||10<document.documentMode)&&(sa=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();J.stopPropagation();J.preventDefault()}));mxEvent.addListener(f.container,
+"drop",mxUtils.bind(this,function(J){null!=sa&&(sa.parentNode.removeChild(sa),sa=null);if(f.isEnabled()){var V=mxUtils.convertPoint(f.container,mxEvent.getClientX(J),mxEvent.getClientY(J)),T=J.dataTransfer.files,ba=f.view.translate,Y=f.view.scale,p=V.x/Y-ba.x,E=V.y/Y-ba.y;if(0<T.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(J)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(T,!0)):(mxEvent.isAltDown(J)&&(E=p=null),this.importFiles(T,p,E,this.maxImageSize,
+null,null,null,null,mxEvent.isControlDown(J),null,null,mxEvent.isShiftDown(J),J));else{mxEvent.isAltDown(J)&&(E=p=0);var Q=0<=mxUtils.indexOf(J.dataTransfer.types,"text/uri-list")?J.dataTransfer.getData("text/uri-list"):null;V=this.extractGraphModelFromEvent(J,null!=this.pages);if(null!=V)f.setSelectionCells(this.importXml(V,p,E,!0));else if(0<=mxUtils.indexOf(J.dataTransfer.types,"text/html")){var Z=J.dataTransfer.getData("text/html");V=document.createElement("div");V.innerHTML=Graph.sanitizeHtml(Z);
+var W=null;T=V.getElementsByTagName("img");null!=T&&1==T.length?(Z=T[0].getAttribute("src"),null==Z&&(Z=T[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Z)||(W=!0)):(T=V.getElementsByTagName("a"),null!=T&&1==T.length?Z=T[0].getAttribute("href"):(V=V.getElementsByTagName("pre"),null!=V&&1==V.length&&(Z=mxUtils.getTextContent(V[0]))));var X=!0,da=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(Z,p,E,!0,W,null,X,mxEvent.isControlDown(J)))});W&&null!=Z&&Z.length>
+this.resampleThreshold?this.confirmImageResize(function(la){X=la;da()},mxEvent.isControlDown(J)):da()}else null!=Q&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Q)?this.loadImage(decodeURIComponent(Q),mxUtils.bind(this,function(la){var pa=Math.max(1,la.width);la=Math.max(1,la.height);var ma=this.maxImageSize;ma=Math.min(1,Math.min(ma/Math.max(1,pa)),ma/Math.max(1,la));f.setSelectionCell(f.insertVertex(null,null,"",p,E,pa*ma,la*ma,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+Q+";"))}),mxUtils.bind(this,function(la){f.setSelectionCells(this.insertTextAt(Q,p,E,!0))})):0<=mxUtils.indexOf(J.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(J.dataTransfer.getData("text/plain"),p,E,!0))}}J.stopPropagation();J.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();ca=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",
+ca);this.addListener("sketchModeChanged",ca);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.refresh()}));f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);else{var J=parseInt(this.div.offsetLeft),V=parseInt(this.div.offsetWidth),T=d.embedViewport.x+d.embedViewport.width,ba=parseInt(this.div.offsetTop),
+Y=parseInt(this.div.offsetHeight),p=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(J,T-V))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(ba,p-Y))+"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("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme)ca=
+Editor.currentTheme,Editor.currentTheme="",this.doSetCurrentTheme(ca,0,mxUtils.bind(this,function(){"1"==urlParams.embedInline&&this.initializeInlineEmbedMode()}));mxClient.IS_IE||mxClient.IS_IE11||"0"==urlParams.dark||"atlas"==Editor.currentTheme||"1"==urlParams.embed&&"1"!=urlParams.dark||(ca=!1,window.matchMedia&&this.isAutoDarkMode()?ca=window.matchMedia("(prefers-color-scheme: dark)").matches:this.isSettingsEnabled()&&!0===mxSettings.settings.darkMode&&(ca=!0),(ca||"dark"==uiTheme||"1"==urlParams.dark)&&
+this.setDarkMode(!0));if(window.matchMedia)try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(J){this.isAutoDarkMode()&&this.setDarkMode(J.matches)}))}catch(J){}else this.isSettingsEnabled()&&!0===mxSettings.settings.darkMode&&(ca=!0);this.installSettings();"1"==urlParams.prefetchFonts&&d.editor.loadFonts()};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,g=this.sketchPickerMenuElt,
+u=this.editor.graph;g.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(G){mxEvent.getSource(G)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(G),mxEvent.getClientY(G)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var x=document.createElement("div");x.style.position="absolute";x.style.width="10px";x.style.height="10px";x.style.borderRadius="5px";x.style.border="1px solid gray";x.style.background=
+"#ffffff";x.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(x);this.bottomResizer=x;var A=null,H=null,P=null,M=null;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(G){M=parseInt(this.diagramContainer.style.height);H=mxEvent.getClientY(G);u.popupMenuHandler.hideMenu();mxEvent.consume(G)}));x=x.cloneNode(!1);x.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(x);this.rightResizer=x;mxEvent.addGestureListeners(x,mxUtils.bind(this,function(G){P=parseInt(this.diagramContainer.style.width);
+A=mxEvent.getClientX(G);u.popupMenuHandler.hideMenu();mxEvent.consume(G)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(G){var ia=!1;null!=A&&(this.diagramContainer.style.width=Math.max(20,P+mxEvent.getClientX(G)-A)+"px",ia=!0);null!=H&&(this.diagramContainer.style.height=Math.max(20,M+mxEvent.getClientY(G)-H)+"px",ia=!0);ia&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),
+"*"),this.inlineSizeChanged(),this.refresh())}),function(G){null==A&&null==H||mxEvent.consume(G);H=A=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";d.style.visibility="hidden";g.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(G){this.inlineSizeChanged();
+this.fitWindows()}));this.addListener("darkModeChanged",mxUtils.bind(this,function(G){this.inlineSizeChanged()}));this.addListener("editInlineStop",mxUtils.bind(this,function(G){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";d.style.visibility="hidden";g.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(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,u=!1,x=0;x<g.types.length;x++)if("text/"===g.types[x].substring(0,5)){u=!0;break}if(!u){var A=g.items;for(index in A){var H=A[index];if("file"===H.kind){if(d.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,
+function(M,G,ia,ja,ha,ca){d.insertImage(M,ha,ca)},function(){},function(M){return"image/"==M.type.substring(0,6)},function(M){for(var G=0;G<M.length;G++)M[G]()});else{var P=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],P.x,P.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(M){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,
+g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize=
+"none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var u=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(A){var H=mxEvent.getSource(A);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||224!=A.keyCode&&
+(mxClient.IS_MAC||17!=A.keyCode)&&(!mxClient.IS_MAC||91!=A.keyCode&&93!=A.keyCode)||u||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",A=f.container.scrollLeft,H=f.container.scrollTop,f.container.appendChild(g),u=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=A,f.container.scrollTop=H)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(A){var H=A.keyCode;window.setTimeout(mxUtils.bind(this,function(){!u||224!=H&&
+17!=H&&91!=H&&93!=H||(u=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(A){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(A){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(H){this.handleError(H)}}));mxEvent.addListener(g,
+"paste",mxUtils.bind(this,function(A){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=A.clipboardData&&this.pasteCells(A,g,!0,!0),!mxEvent.isConsumed(A))){var H=f.container.scrollLeft,P=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=H;f.container.scrollTop=P;this.pasteCells(A,g,!1,!0)}),0)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=function(A){return mxEvent.getSource(A)==g?!0:x.apply(this,
+arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){d=null!=d?d:Editor.currentTheme;return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,f,g){function u(M){return"simple"==M||0==f&&"sketch"==M}f=null!=f?f:100;var x=Editor.currentTheme,A=u(x)&&this.isDefaultTheme(d)||this.isDefaultTheme(x)&&
+u(d),H=A&&"sketch"!=d&&"sketch"!=x;if(A&&!this.themeSwitching){Editor.currentTheme=d;this.themeSwitching=!0;var P=this.saveScrollState();mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms");0==f&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){u(x)&&this.isDefaultTheme(d)?(null!=this.sidebarFooterContainer&&(this.sidebarFooterContainer.style.display="block"),this.menubarContainer.style.display=
+"block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):this.isDefaultTheme(x)&&u(d)&&(null!=this.sidebarFooterContainer&&(this.sidebarFooterContainer.style.display="none"),this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display=
+"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();this.restoreScrollState(P);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching;
+null!=g&&g()}),f)}),f)}),f)}),0)}return H};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var g=mxUtils.bind(this,function(){if("sketch"==
+Editor.currentTheme){var u=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=u&&null!=u.getAttribute("class");if(!f&&null!=u){u=u.getAttribute("title");var x=this.getCurrentFile();x=null!=x?x.savingStatusKey:DrawioFile.prototype.savingStatusKey;u==mxResources.get(x)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(x))+'..."src="'+Editor.tailSpin+'"></div>',
+f=!0)}this.statusContainer.style.display="none";u=32>=d.clientWidth;d.style.visibility=u&&""==this.editor.getStatus()?"hidden":"";if(u||f)this.statusContainer.style.display="inline-flex",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="inline-flex",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",g);g()};EditorUi.prototype.switchTheme=function(d){this.isDefaultTheme(d)&&
+null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));
+this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);this.createPickerMenuForTheme(d);this.createMainMenuForTheme(d);this.createMenubarForTheme(d);this.createFooterMenuForTheme(d);this.sidebarContainer.style.display="";if("simple"==d||"sketch"==d)this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.formatContainer.style.zIndex=
+"",this.formatContainer.style.border="none",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="63px",this.sidebarContainer.style.width="100%";null!=this.format&&(d=this.isDefaultTheme(d)||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,this.format.refresh()))};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(),f=0;f<d.length;f++)null!=d[f]&&d[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var d=this.getWindows(),f=0;f<d.length;f++)null!=d[f]&&d[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(){null!=
+this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),
+this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(d){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;
+f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=d&&"sketch"!=d);"simple"==d||"sketch"==d?(mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,
+Editor.fitWindowBorders=new mxRectangle(60,30,30,30),f.defaultEdgeLength=120,null==urlParams.grid&&(f.defaultGridEnabled=!1),null==urlParams.pv&&(f.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(d){"simple"==d||"sketch"==d?null==this.sketchStyleElt&&
+(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(d){"simple"==d||"sketch"==d?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),
+this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=
+function(d){"simple"!=d&&"sketch"!=d||null!=this.sketchMainMenuElt||(this.sketchMainMenuElt=document.createElement("div"),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",this.sketchMainMenuElt.appendChild(this.createMenu("diagram",Editor.menuImage)),
+this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage)),this.sketchWrapperElt.appendChild(this.sketchMainMenuElt))};EditorUi.prototype.createFooterMenuForTheme=function(d){if(("simple"==d||"sketch"==d)&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className=
"geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";d=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";
d.appendChild(f);var g=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var x=null!=this.pages?this.pages.length:1,A=this.getPageIndex(this.currentPage);A=null!=A?A+1:1;var H=this.currentPage.getId();f.setAttribute("title",this.currentPage.getName()+" ("+A+"/"+x+")"+(null!=H?" ["+H+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",
g);g();g=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",g);this.editor.addListener("pagesPatched",g);g();d.appendChild(this.createMenuItem("zoomOut",Editor.minusImage));g=this.createMenu("viewZoom");g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";
@@ -3708,7 +3708,7 @@ this.addListener("inlineFullscreenChanged",g);d.appendChild(this.createMenuItem(
var g=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(g.style,"transition","transform .3s ease-out");var u=document.createElement("a");u.style.padding="0px";u.style.boxShadow="none";u.className="geMenuItem geAdaptiveAsset";u.style.display="block";u.style.width="100%";u.style.height="14px";u.style.margin="4px 0 2px 0";u.style.backgroundImage="url("+Editor.expandMoreImage+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="22px";mxUtils.setOpacity(u,
40);u.setAttribute("title",mxResources.get("collapseExpand"));var x=u.style.margin,A=this.createMenuItem("insertFreehand",Editor.freehandImage,!0);A.style.paddingLeft="12px";A.style.backgroundSize="";A.style.width="26px";A.style.height="30px";A.style.opacity="0.7";var H=this.createMenu("insert",Editor.addBoxImage);H.style.backgroundSize="";H.style.display="block";H.style.width="30px";H.style.height="30px";H.style.padding="4px 4px 0px 4px";H.style.opacity="0.7";var P=H.cloneNode(!0);P.style.backgroundImage=
"url("+Editor.shapesImage+")";P.style.backgroundSize="24px";mxEvent.addListener(P,"click",mxUtils.bind(this,function(ia){var ja=mxUtils.getOffset(H);this.showShapePicker(this.diagramContainer.scrollLeft+ja.x+H.offsetWidth+8,this.diagramContainer.scrollTop+ja.y+10,null,null,null,null,mxUtils.bind(this,function(ha){return f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(ha,!0))}));mxEvent.consume(ia)}));H.style.backgroundSize="24px";H.style.marginBottom="4px";var M=!1,G=mxUtils.bind(this,function(){g.innerText=
-"";if(!M){var ia=function(ha,ba,oa,sa,J,V){null!=ba&&ha.setAttribute("title",ba);ha.style.cursor="pointer";ha.style.margin="8px 0px 8px 2px";ha.style.display="block";g.appendChild(ha);null!=sa&&(ba=J,ba=null!=ba?ba:30,V=null!=V?V:26,ha.style.position="relative",ha.style.overflow="visible",oa=document.createElement("div"),oa.style.position="absolute",oa.style.fontSize="8px",oa.style.left=ba+"px",oa.style.top=V+"px",mxUtils.write(oa,sa),ha.appendChild(oa));return ha};ia(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
+"";if(!M){var ia=function(ha,ca,oa,sa,J,V){null!=ca&&ha.setAttribute("title",ca);ha.style.cursor="pointer";ha.style.margin="8px 0px 8px 2px";ha.style.display="block";g.appendChild(ha);null!=sa&&(ca=J,ca=null!=ca?ca:30,V=null!=V?V:26,ha.style.position="relative",ha.style.overflow="visible",oa=document.createElement("div"),oa.style.position="absolute",oa.style.fontSize="8px",oa.style.left=ca+"px",oa.style.top=V+"px",mxUtils.write(oa,sa),ha.appendChild(oa));return ha};ia(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,null,38,38),mxResources.get("text")+" (A)",null,"A",32).style.margin="0 0 0 -2px";ia(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0,null,28,28),mxResources.get("note")+
" (S)",null,"S").style.margin="4px 0px 6px 2px";ia(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0,null,28,28),mxResources.get("rectangle")+" (D)",null,"D").style.margin="4px 0px 6px 2px";ia(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0,null,28,28),mxResources.get("ellipse")+" (F)",null,"F").style.margin="4px 0px 6px 2px";var ja=new mxCell("",
new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ja.geometry.setTerminalPoint(new mxPoint(0,0),!0);ja.geometry.setTerminalPoint(new mxPoint(ja.geometry.width,0),!1);ja.geometry.points=[];ja.geometry.relative=!0;ja.edge=!0;ia(this.sidebar.createEdgeTemplateFromCells([ja],ja.geometry.width,ja.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1,28,28),mxResources.get("line")+" (C)",null,"C").style.margin="1px 0px 1px 2px";
@@ -3776,10 +3776,10 @@ x.getInsertPoint(),x.isMouseInsertPoint()&&(H=0,x.lastPasteXml==d&&0<x.pasteCoun
P=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var M=decodeURIComponent(H);this.isCompatibleString(M)&&(P=!0,H=M)}catch(oa){}P=P?null:d.clipboardData.getData("text/html");null!=P&&0<P.length?(x=this.parseHtmlData(P),A="text/plain"!=x.getAttribute("data-type")):null!=H&&0<H.length&&(x=document.createElement("div"),mxUtils.setTextContent(x,P))}H=x.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))g=
H[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(oa){var sa=this.editor.graph;sa.lastPasteXml==oa?sa.pasteCounter++:(sa.lastPasteXml=oa,sa.pasteCounter=0);var J=sa.pasteCounter*sa.gridSize;sa.setSelectionCells(this.importXml(oa,J,J));sa.scrollCellToVisible(sa.getSelectionCell())}),mxUtils.bind(this,function(oa){this.handleError(oa)})),mxEvent.consume(d));else{var G=A?x.innerHTML:mxUtils.trim(null==x.innerText?mxUtils.getTextContent(x):
x.innerText),ia=!1;try{var ja=G.lastIndexOf("%3E");0<=ja&&ja<G.length-3&&(G=G.substring(0,ja+3))}catch(oa){}try{H=x.getElementsByTagName("span"),(M=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)):decodeURIComponent(G))&&(this.isCompatibleString(M)||0==M.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ia=!0,G=M)}catch(oa){}try{if(null!=G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ha=mxUtils.bind(this,function(){try{G=
-(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,u,ia,d)}catch(oa){console.log("Miro import error:",oa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ha):ha()}else this.pasteXml(G,u,ia,d);try{mxEvent.consume(d)}catch(oa){}}else if(!g){var ba=this.editor.graph;ba.lastPasteXml=null;ba.pasteCounter=0}}catch(oa){this.handleError(oa)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],
+(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,u,ia,d)}catch(oa){console.log("Miro import error:",oa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ha):ha()}else this.pasteXml(G,u,ia,d);try{mxEvent.consume(d)}catch(oa){}}else if(!g){var ca=this.editor.graph;ca.lastPasteXml=null;ca.pasteCounter=0}}catch(oa){this.handleError(oa)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],
"dragleave",function(u){null!=f&&(f.parentNode.removeChild(f),f=null);u.stopPropagation();u.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(u){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());u.stopPropagation();u.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(u){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||
"1"!=urlParams.embed)if(0<u.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(u.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(u)&&!mxEvent.isShiftDown(u)):this.openFiles(u.dataTransfer.files,!0);else{var x=this.extractGraphModelFromEvent(u);if(null==x){var A=null!=u.dataTransfer?u.dataTransfer:u.clipboardData;null!=A&&(10==document.documentMode||11==document.documentMode?x=A.getData("Text"):(x=null,x=0<=mxUtils.indexOf(A.types,
-"text/uri-list")?u.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(A.types,"text/html")?A.getData("text/html"):null,null!=x&&0<x.length?(A=document.createElement("div"),A.innerHTML=this.editor.graph.sanitizeHtml(x),A=A.getElementsByTagName("img"),0<A.length&&(x=A[0].getAttribute("src"))):0<=mxUtils.indexOf(A.types,"text/plain")&&(x=A.getData("text/plain"))),null!=x&&(Editor.isPngDataUrl(x)?(x=Editor.extractGraphModelFromPng(x),null!=x&&0<x.length&&this.openLocalFile(x,null,!0)):this.isRemoteFileFormat(x)?
+"text/uri-list")?u.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(A.types,"text/html")?A.getData("text/html"):null,null!=x&&0<x.length?(A=document.createElement("div"),A.innerHTML=Graph.sanitizeHtml(x),A=A.getElementsByTagName("img"),0<A.length&&(x=A[0].getAttribute("src"))):0<=mxUtils.indexOf(A.types,"text/plain")&&(x=A.getData("text/plain"))),null!=x&&(Editor.isPngDataUrl(x)?(x=Editor.extractGraphModelFromPng(x),null!=x&&0<x.length&&this.openLocalFile(x,null,!0)):this.isRemoteFileFormat(x)?
this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(x))).send(mxUtils.bind(this,function(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(x)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(x):
window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(x)))))}else this.openLocalFile(x,null,!0)}u.stopPropagation();u.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var u=document.body;var x=document.documentElement;var A=(u.clientWidth||x.clientWidth)-3;u=Math.max(u.clientHeight||0,x.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,A=d.clientWidth,u=d.clientHeight;
x=document.createElement("div");x.style.zIndex=mxPopupMenu.prototype.zIndex+2;x.style.border="3px dotted rgb(254, 137, 12)";x.style.pointerEvents="none";x.style.position="absolute";x.style.top=f+"px";x.style.left=g+"px";x.style.width=Math.max(0,A-3)+"px";x.style.height=Math.max(0,u-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(x):document.body.appendChild(x);return x};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);
@@ -3802,13 +3802,13 @@ this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,
this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,u=!1,x=null,A=mxUtils.bind(this,function(M,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,A);mxEvent.addListener(window,
"message",mxUtils.bind(this,function(M){if(M.source==(window.opener||window.parent)){var G=M.data,ia=null,ja=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&("%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(ta){}return ra});
if("json"==urlParams.proto){var ha=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[M],"data",[G])}catch(ra){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));
-return}if("prompt"==G.action){this.spinner.stop();var ba=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(ra){null!=ra?H.postMessage(JSON.stringify({event:"prompt",value:ra,message:G}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(ba.container,300,80,!0,!1);ba.init();return}if("draft"==G.action){var oa=ja(G.xml);this.spinner.stop();ba=new DraftDialog(this,
+return}if("prompt"==G.action){this.spinner.stop();var ca=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(ra){null!=ra?H.postMessage(JSON.stringify({event:"prompt",value:ra,message:G}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(ca.container,300,80,!0,!1);ca.init();return}if("draft"==G.action){var oa=ja(G.xml);this.spinner.stop();ca=new DraftDialog(this,
mxResources.get("draftFound",[G.name||this.defaultFilename]),oa,mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",
-result:"ignore",message:G}),"*")}):null);this.showDialog(ba.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&this.actions.get("exit").funct()}));try{ba.init()}catch(ra){H.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var sa=1==G.enableRecent,J=1==G.enableSearch,V=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var T=this.getCurrentUser(),ca=new TemplatesDialog(this,
+result:"ignore",message:G}),"*")}):null);this.showDialog(ca.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&this.actions.get("exit").funct()}));try{ca.init()}catch(ra){H.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var sa=1==G.enableRecent,J=1==G.enableSearch,V=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var T=this.getCurrentUser(),ba=new TemplatesDialog(this,
function(ra,ta,Aa){ra=ra||this.emptyDiagramXml;H.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ta,tempUrl:Aa.url,libs:Aa.libs,builtIn:null!=Aa.info&&null!=Aa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=T?T.id:null,sa?mxUtils.bind(this,function(ra,ta,Aa){this.remoteInvoke("getRecentDiagrams",[Aa],null,ra,ta)}):null,J?mxUtils.bind(this,function(ra,ta,Aa,Oa){this.remoteInvoke("searchDiagrams",
-[ra,Oa],null,ta,Aa)}):null,mxUtils.bind(this,function(ra,ta,Aa){this.remoteInvoke("getFileContent",[ra.url],null,ta,Aa)}),null,V?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,!1,!1,!0,!0);this.showDialog(ca.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}ba=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(ra,ta,Aa,Oa){ra=ra||this.emptyDiagramXml;null!=G.callback?H.postMessage(JSON.stringify({event:"template",
+[ra,Oa],null,ta,Aa)}):null,mxUtils.bind(this,function(ra,ta,Aa){this.remoteInvoke("getFileContent",[ra.url],null,ta,Aa)}),null,V?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,!1,!1,!0,!0);this.showDialog(ba.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}ca=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(ra,ta,Aa,Oa){ra=ra||this.emptyDiagramXml;null!=G.callback?H.postMessage(JSON.stringify({event:"template",
xml:ra,blank:ra==this.emptyDiagramXml,name:ta,tempUrl:Aa,libs:Oa,builtIn:!0,message:G}),"*"):(d(ra,M,ra!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,sa?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):null,J?mxUtils.bind(this,function(ra,ta){this.remoteInvoke("searchDiagrams",[ra,null],null,ta,function(){ta(null,"Network Error!")})}):null,mxUtils.bind(this,
-function(ra,ta,Aa){H.postMessage(JSON.stringify({event:"template",docUrl:ra,info:ta,name:Aa}),"*")}),null,null,V?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==G.withoutType);this.showDialog(ba.container,620,460,!0,!1,mxUtils.bind(this,function(ra){this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));ba.init();return}if("textContent"==G.action){var Y=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent",
+function(ra,ta,Aa){H.postMessage(JSON.stringify({event:"template",docUrl:ra,info:ta,name:Aa}),"*")}),null,null,V?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==G.withoutType);this.showDialog(ca.container,620,460,!0,!1,mxUtils.bind(this,function(ra){this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));ca.init();return}if("textContent"==G.action){var Y=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent",
data:Y,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var p=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();
return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var E=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var Q=this.editor.graph,Z=mxUtils.bind(this,function(ra){this.editor.graph.setEnabled(!0);
this.spinner.stop();var ta=this.createLoadMessage("export");ta.format=G.format;ta.message=G;ta.data=ra;ta.xml=E;H.postMessage(JSON.stringify(ta),"*")}),W=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==G.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(E)));Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);Z(ra)}),X=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var da=
@@ -3835,14 +3835,14 @@ this.actions.get("saveAndExit").funct)));"1"!=urlParams.noExitBtn&&d.appendChild
this.buttonContainer.style.top="0px"),this.buttonContainer.appendChild(d),this.editor.fireEvent(new mxEventObject("statusChanged"))):null!=this.menubar&&(d.style.position="absolute",d.style.padding="2px",d.style.right="62px",this.toolbar.container.appendChild(d),this.toolbar.staticElements.push(d))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),
null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&
(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),
-u=[],x=[],A=[],H={};if(0<g.length){var P={},M=this.editor.graph,G=null,ia=null,ja=null,ha=null,ba=null,oa=null,sa=null,J="whiteSpace=wrap;html=1;",V=null,T=null,ca="",Y="auto",p="auto",E=!1,Q=null,Z=null,W=40,X=40,da=100,la=0,pa=mxUtils.bind(this,function(){null!=f?f(Sa):(M.setSelectionCells(Sa),M.scrollCellToVisible(M.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ma=M.getFreeInsertPoint(),qa=ma.x,za=ma.y;ma=za;var ya=
-null,ra="auto";T=null;for(var ta=[],Aa=null,Oa=null,Ka=0;Ka<g.length&&"#"==g[Ka].charAt(0);){d=g[Ka].replace(/\r$/,"");for(Ka++;Ka<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ka].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ka].substring(1)),Ka++;if("#"!=d.charAt(1)){var Ma=d.indexOf(":");if(0<Ma){var Ga=mxUtils.trim(d.substring(1,Ma)),Ba=mxUtils.trim(d.substring(Ma+1));"label"==Ga?ya=M.sanitizeHtml(Ba):"labelname"==Ga&&0<Ba.length&&"-"!=Ba?ba=Ba:"labels"==Ga&&0<Ba.length&&"-"!=Ba?sa=JSON.parse(Ba):
-"style"==Ga?ia=Ba:"parentstyle"==Ga?J=Ba:"unknownStyle"==Ga&&"-"!=Ba?oa=Ba:"stylename"==Ga&&0<Ba.length&&"-"!=Ba?ha=Ba:"styles"==Ga&&0<Ba.length&&"-"!=Ba?ja=JSON.parse(Ba):"vars"==Ga&&0<Ba.length&&"-"!=Ba?G=JSON.parse(Ba):"identity"==Ga&&0<Ba.length&&"-"!=Ba?V=Ba:"parent"==Ga&&0<Ba.length&&"-"!=Ba?T=Ba:"namespace"==Ga&&0<Ba.length&&"-"!=Ba?ca=Ba:"width"==Ga?Y=Ba:"height"==Ga?p=Ba:"collapsed"==Ga&&"-"!=Ba?E="true"==Ba:"left"==Ga&&0<Ba.length?Q=Ba:"top"==Ga&&0<Ba.length?Z=Ba:"ignore"==Ga?Oa=Ba.split(","):
-"connect"==Ga?ta.push(JSON.parse(Ba)):"link"==Ga?Aa=Ba:"padding"==Ga?la=parseFloat(Ba):"edgespacing"==Ga?W=parseFloat(Ba):"nodespacing"==Ga?X=parseFloat(Ba):"levelspacing"==Ga?da=parseFloat(Ba):"layout"==Ga&&(ra=Ba)}}}if(null==g[Ka])throw Error(mxResources.get("invalidOrMissingFile"));var cb=this.editor.csvToArray(g[Ka].replace(/\r$/,""));Ma=d=null;Ga=[];for(Ba=0;Ba<cb.length;Ba++)V==cb[Ba]&&(d=Ba),T==cb[Ba]&&(Ma=Ba),Ga.push(mxUtils.trim(cb[Ba]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,
-""));null==ya&&(ya="%"+Ga[0]+"%");if(null!=ta)for(var Na=0;Na<ta.length;Na++)null==P[ta[Na].to]&&(P[ta[Na].to]={});V=[];for(Ba=Ka+1;Ba<g.length;Ba++){var y=this.editor.csvToArray(g[Ba].replace(/\r$/,""));if(null==y){var L=40<g[Ba].length?g[Ba].substring(0,40)+"...":g[Ba];throw Error(L+" ("+Ba+"):\n"+mxResources.get("containsValidationErrors"));}0<y.length&&V.push(y)}M.model.beginUpdate();try{for(Ba=0;Ba<V.length;Ba++){y=V[Ba];var O=null,U=null!=d?ca+y[d]:null;g=!1;null!=U&&(O=M.model.getCell(U),g=
-null==O||0<=mxUtils.indexOf(u,O));var aa=new mxCell(ya,new mxGeometry(qa,ma,0,0),ia||"whiteSpace=wrap;html=1;");aa.collapsed=E;aa.vertex=!0;aa.id=U;null==O||g||M.model.setCollapsed(O,E);for(var ea=0;ea<y.length;ea++)M.setAttributeForCell(aa,Ga[ea],y[ea]),null==O||g||M.setAttributeForCell(O,Ga[ea],y[ea]);if(null!=ba&&null!=sa){var na=sa[aa.getAttribute(ba)];null!=na&&(M.labelChanged(aa,na),null==O||g||M.cellLabelChanged(O,na))}if(null!=ha&&null!=ja){var va=ja[aa.getAttribute(ha)];null!=va&&(aa.style=
+u=[],x=[],A=[],H={};if(0<g.length){var P={},M=this.editor.graph,G=null,ia=null,ja=null,ha=null,ca=null,oa=null,sa=null,J="whiteSpace=wrap;html=1;",V=null,T=null,ba="",Y="auto",p="auto",E=!1,Q=null,Z=null,W=40,X=40,da=100,la=0,pa=mxUtils.bind(this,function(){null!=f?f(Sa):(M.setSelectionCells(Sa),M.scrollCellToVisible(M.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),ma=M.getFreeInsertPoint(),qa=ma.x,za=ma.y;ma=za;var ya=
+null,ra="auto";T=null;for(var ta=[],Aa=null,Oa=null,Ka=0;Ka<g.length&&"#"==g[Ka].charAt(0);){d=g[Ka].replace(/\r$/,"");for(Ka++;Ka<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Ka].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Ka].substring(1)),Ka++;if("#"!=d.charAt(1)){var Ma=d.indexOf(":");if(0<Ma){var Ga=mxUtils.trim(d.substring(1,Ma)),Ba=mxUtils.trim(d.substring(Ma+1));"label"==Ga?ya=Graph.sanitizeHtml(Ba):"labelname"==Ga&&0<Ba.length&&"-"!=Ba?ca=Ba:"labels"==Ga&&0<Ba.length&&"-"!=Ba?sa=
+JSON.parse(Ba):"style"==Ga?ia=Ba:"parentstyle"==Ga?J=Ba:"unknownStyle"==Ga&&"-"!=Ba?oa=Ba:"stylename"==Ga&&0<Ba.length&&"-"!=Ba?ha=Ba:"styles"==Ga&&0<Ba.length&&"-"!=Ba?ja=JSON.parse(Ba):"vars"==Ga&&0<Ba.length&&"-"!=Ba?G=JSON.parse(Ba):"identity"==Ga&&0<Ba.length&&"-"!=Ba?V=Ba:"parent"==Ga&&0<Ba.length&&"-"!=Ba?T=Ba:"namespace"==Ga&&0<Ba.length&&"-"!=Ba?ba=Ba:"width"==Ga?Y=Ba:"height"==Ga?p=Ba:"collapsed"==Ga&&"-"!=Ba?E="true"==Ba:"left"==Ga&&0<Ba.length?Q=Ba:"top"==Ga&&0<Ba.length?Z=Ba:"ignore"==
+Ga?Oa=Ba.split(","):"connect"==Ga?ta.push(JSON.parse(Ba)):"link"==Ga?Aa=Ba:"padding"==Ga?la=parseFloat(Ba):"edgespacing"==Ga?W=parseFloat(Ba):"nodespacing"==Ga?X=parseFloat(Ba):"levelspacing"==Ga?da=parseFloat(Ba):"layout"==Ga&&(ra=Ba)}}}if(null==g[Ka])throw Error(mxResources.get("invalidOrMissingFile"));var cb=this.editor.csvToArray(g[Ka].replace(/\r$/,""));Ma=d=null;Ga=[];for(Ba=0;Ba<cb.length;Ba++)V==cb[Ba]&&(d=Ba),T==cb[Ba]&&(Ma=Ba),Ga.push(mxUtils.trim(cb[Ba]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,
+"").replace(/_+$/,""));null==ya&&(ya="%"+Ga[0]+"%");if(null!=ta)for(var Na=0;Na<ta.length;Na++)null==P[ta[Na].to]&&(P[ta[Na].to]={});V=[];for(Ba=Ka+1;Ba<g.length;Ba++){var y=this.editor.csvToArray(g[Ba].replace(/\r$/,""));if(null==y){var L=40<g[Ba].length?g[Ba].substring(0,40)+"...":g[Ba];throw Error(L+" ("+Ba+"):\n"+mxResources.get("containsValidationErrors"));}0<y.length&&V.push(y)}M.model.beginUpdate();try{for(Ba=0;Ba<V.length;Ba++){y=V[Ba];var O=null,U=null!=d?ba+y[d]:null;g=!1;null!=U&&(O=M.model.getCell(U),
+g=null==O||0<=mxUtils.indexOf(u,O));var aa=new mxCell(ya,new mxGeometry(qa,ma,0,0),ia||"whiteSpace=wrap;html=1;");aa.collapsed=E;aa.vertex=!0;aa.id=U;null==O||g||M.model.setCollapsed(O,E);for(var ea=0;ea<y.length;ea++)M.setAttributeForCell(aa,Ga[ea],y[ea]),null==O||g||M.setAttributeForCell(O,Ga[ea],y[ea]);if(null!=ca&&null!=sa){var na=sa[aa.getAttribute(ca)];null!=na&&(M.labelChanged(aa,na),null==O||g||M.cellLabelChanged(O,na))}if(null!=ha&&null!=ja){var va=ja[aa.getAttribute(ha)];null!=va&&(aa.style=
va)}M.setAttributeForCell(aa,"placeholders","1");aa.style=M.replacePlaceholders(aa,aa.style,G);null==O||g?M.fireEvent(new mxEventObject("cellsInserted","cells",[aa])):(M.model.setStyle(O,aa.style),0>mxUtils.indexOf(A,O)&&A.push(O),M.fireEvent(new mxEventObject("cellsInserted","cells",[O])));g=null!=O;O=aa;if(!g)for(Na=0;Na<ta.length;Na++)P[ta[Na].to][O.getAttribute(ta[Na].to)]=O;null!=Aa&&"link"!=Aa&&(M.setLinkForCell(O,O.getAttribute(Aa)),M.setAttributeForCell(O,Aa,null));var ua=this.editor.graph.getPreferredSizeForCell(O);
-T=null!=Ma?M.model.getCell(ca+y[Ma]):null;if(O.vertex){L=null!=T?0:qa;Ka=null!=T?0:za;null!=Q&&null!=O.getAttribute(Q)&&(O.geometry.x=L+parseFloat(O.getAttribute(Q)));null!=Z&&null!=O.getAttribute(Z)&&(O.geometry.y=Ka+parseFloat(O.getAttribute(Z)));var xa="@"==Y.charAt(0)?O.getAttribute(Y.substring(1)):null;O.geometry.width=null!=xa&&"auto"!=xa?parseFloat(O.getAttribute(Y.substring(1))):"auto"==Y||"auto"==xa?ua.width+la:parseFloat(Y);var Ca="@"==p.charAt(0)?O.getAttribute(p.substring(1)):null;O.geometry.height=
+T=null!=Ma?M.model.getCell(ba+y[Ma]):null;if(O.vertex){L=null!=T?0:qa;Ka=null!=T?0:za;null!=Q&&null!=O.getAttribute(Q)&&(O.geometry.x=L+parseFloat(O.getAttribute(Q)));null!=Z&&null!=O.getAttribute(Z)&&(O.geometry.y=Ka+parseFloat(O.getAttribute(Z)));var xa="@"==Y.charAt(0)?O.getAttribute(Y.substring(1)):null;O.geometry.width=null!=xa&&"auto"!=xa?parseFloat(O.getAttribute(Y.substring(1))):"auto"==Y||"auto"==xa?ua.width+la:parseFloat(Y);var Ca="@"==p.charAt(0)?O.getAttribute(p.substring(1)):null;O.geometry.height=
null!=Ca&&"auto"!=Ca?parseFloat(Ca):"auto"==p||"auto"==Ca?ua.height+la:parseFloat(p);ma+=O.geometry.height+X}g?(null==H[U]&&(H[U]=[]),H[U].push(O)):(u.push(O),null!=T?(T.style=M.replacePlaceholders(T,J,G),M.addCell(O,T),x.push(T)):A.push(M.addCell(O)))}for(Ba=0;Ba<x.length;Ba++)xa="@"==Y.charAt(0)?x[Ba].getAttribute(Y.substring(1)):null,Ca="@"==p.charAt(0)?x[Ba].getAttribute(p.substring(1)):null,"auto"!=Y&&"auto"!=xa||"auto"!=p&&"auto"!=Ca||M.updateGroupBounds([x[Ba]],la,!0);var La=A.slice(),Sa=A.slice();
for(Na=0;Na<ta.length;Na++){var Ta=ta[Na];for(Ba=0;Ba<u.length;Ba++){O=u[Ba];var Ja=mxUtils.bind(this,function(Za,fb,gb){var mb=fb.getAttribute(gb.from);if(null!=mb&&""!=mb){mb=mb.split(",");for(var ub=0;ub<mb.length;ub++){var lb=P[gb.to][mb[ub]];if(null==lb&&null!=oa){lb=new mxCell(mb[ub],new mxGeometry(qa,za,0,0),oa);lb.style=M.replacePlaceholders(fb,lb.style,G);var ib=this.editor.graph.getPreferredSizeForCell(lb);lb.geometry.width=ib.width+la;lb.geometry.height=ib.height+la;P[gb.to][mb[ub]]=lb;
lb.vertex=!0;lb.id=mb[ub];A.push(M.addCell(lb))}if(null!=lb){ib=gb.label;null!=gb.fromlabel&&(ib=(fb.getAttribute(gb.fromlabel)||"")+(ib||""));null!=gb.sourcelabel&&(ib=M.replacePlaceholders(fb,gb.sourcelabel,G)+(ib||""));null!=gb.tolabel&&(ib=(ib||"")+(lb.getAttribute(gb.tolabel)||""));null!=gb.targetlabel&&(ib=(ib||"")+M.replacePlaceholders(lb,gb.targetlabel,G));var qb="target"==gb.placeholders==!gb.invert?lb:Za;qb=null!=gb.style?M.replacePlaceholders(qb,gb.style,G):M.createCurrentEdgeStyle();ib=
@@ -3864,12 +3864,12 @@ this.actions.get("copyStyle").setEnabled(u&&!d.isSelectionEmpty());this.actions.
f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");
f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(u&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var R=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);R.apply(this,arguments)};null!=window.ExportDialog&&
(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,u,x,A,H,P){var M=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(M.getSvg(u,x,A)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),ia=M.getGraphBounds(),ja=Math.floor(ia.width*x/M.view.scale),ha=Math.floor(ia.height*x/M.view.scale);if(G.length<=MAX_REQUEST_SIZE&&
-ja*ha<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var ba={globalVars:M.getExportVariables()};P&&(ba.grid={size:M.gridSize,steps:M.view.gridSteps,color:M.view.gridColor});d.saveRequest(f,g,function(oa,sa){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(sa||"0")+(null!=oa?"&filename="+encodeURIComponent(oa):"")+"&extras="+encodeURIComponent(JSON.stringify(ba))+(0<H?"&dpi="+H:"")+"&bg="+(null!=u?u:"none")+"&w="+ja+"&h="+ha+"&border="+A+"&xml="+encodeURIComponent(G))})}else"png"==
+ja*ha<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var ca={globalVars:M.getExportVariables()};P&&(ca.grid={size:M.gridSize,steps:M.view.gridSteps,color:M.view.gridColor});d.saveRequest(f,g,function(oa,sa){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(sa||"0")+(null!=oa?"&filename="+encodeURIComponent(oa):"")+"&extras="+encodeURIComponent(JSON.stringify(ca))+(0<H?"&dpi="+H:"")+"&bg="+(null!=u?u:"none")+"&w="+ja+"&h="+ha+"&border="+A+"&xml="+encodeURIComponent(G))})}else"png"==
g?d.exportImage(x,null==u||"none"==u,!0,!1,!1,A,!0,!1,null,P,H):d.exportImage(x,!1,!0,!1,!1,A,!0,!1,"jpeg",P);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var u=d;this.currentPage!=this.pages[g]&&(u=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),u.model.setRoot(this.pages[g].root));f+=
this.pages[g].getName()+" "+u.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,mxUtils.htmlEntities(d));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(u);var x=document.createElement("div");x.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
x.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var A={};try{var H=mxSettings.getCustomLibraries();for(d=0;d<H.length;d++){var P=H[d];if("R"==P.substring(0,1)){var M=JSON.parse(decodeURIComponent(P.substring(1)));A[M[0]]={id:M[0],title:M[1],downloadUrl:M[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){x.innerText="";if(0==G.length)x.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
-"</div>";else for(var ia=0;ia<G.length;ia++){var ja=G[ia];A[ja.id]&&(f[ja.id]=ja);var ha=this.addCheckbox(x,ja.title,A[ja.id]);(function(ba,oa){mxEvent.addListener(oa,"change",function(){this.checked?f[ba.id]=ba:delete f[ba.id]})})(ja,ha)}},mxUtils.bind(this,function(G){x.innerText="";var ia=document.createElement("div");ia.style.padding="8px";ia.style.textAlign="center";mxUtils.write(ia,mxResources.get("error")+": ");mxUtils.write(ia,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));
-x.appendChild(ia)}));g.appendChild(x);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,ia;for(ia in f)null==A[ia]&&(G++,mxUtils.bind(this,function(ja){this.remoteInvoke("getFileContent",[ja.downloadUrl],null,mxUtils.bind(this,function(ha){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ha,ja))}catch(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==
+"</div>";else for(var ia=0;ia<G.length;ia++){var ja=G[ia];A[ja.id]&&(f[ja.id]=ja);var ha=this.addCheckbox(x,ja.title,A[ja.id]);(function(ca,oa){mxEvent.addListener(oa,"change",function(){this.checked?f[ca.id]=ca:delete f[ca.id]})})(ja,ha)}},mxUtils.bind(this,function(G){x.innerText="";var ia=document.createElement("div");ia.style.padding="8px";ia.style.textAlign="center";mxUtils.write(ia,mxResources.get("error")+": ");mxUtils.write(ia,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));
+x.appendChild(ia)}));g.appendChild(x);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,ia;for(ia in f)null==A[ia]&&(G++,mxUtils.bind(this,function(ja){this.remoteInvoke("getFileContent",[ja.downloadUrl],null,mxUtils.bind(this,function(ha){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ha,ja))}catch(ca){this.handleError(ca,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==
G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ia]));for(ia in A)f[ia]||this.closeLibrary(new RemoteLibrary(this,null,A[ia]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,
allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==
g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,u,x){var A=!0,H=window.setTimeout(mxUtils.bind(this,function(){A=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),P=mxUtils.bind(this,function(){window.clearTimeout(H);A&&u.apply(this,arguments)}),M=mxUtils.bind(this,function(){window.clearTimeout(H);
@@ -3877,9 +3877,9 @@ A&&x.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.len
(ja.resp=G);this.remoteWin.postMessage(JSON.stringify(ja),"*")});try{var u=d.funtionName,x=this.remoteInvokableFns[u];if(null!=x&&"function"===typeof this[u]){if(x.allowedDomains){for(var A=!1,H=0;H<x.allowedDomains.length;H++)if(f=="https://"+x.allowedDomains[H]){A=!0;break}if(!A){g(null,"Invalid Call: "+u+" is not allowed.");return}}var P=d.functionArgs;Array.isArray(P)||(P=[]);if(x.isAsync)P.push(function(){g(Array.prototype.slice.apply(arguments))}),P.push(function(G){g(null,G||"Unkown Error")}),
this[u].apply(this,P);else{var M=this[u].apply(this,P);g([M])}}else g(null,"Invalid Call: "+u+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var u=g.open("database",2);u.onupgradeneeded=function(x){try{var A=u.result;1>x.oldVersion&&A.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(A.createObjectStore("files",
{keyPath:"title"}),A.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};u.onsuccess=mxUtils.bind(this,function(x){var A=u.result;this.database=A;EditorUi.migrateStorageFiles&&(StorageFile.migrate(A),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){var P=
-document.createElement("iframe");P.style.display="none";P.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(P);var M=!0,G=!1,ia,ja=0,ha=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);P.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ba=mxUtils.bind(this,function(){ja++;oa()}),oa=mxUtils.bind(this,function(){try{if(ja>=ia.length)ha();else{var J=
-ia[ja];StorageFile.getFileContent(this,J,mxUtils.bind(this,function(V){null==V||".scratchpad"==J&&V==this.emptyLibraryXml?P.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[J]}),"*"):ba()}),ba)}}catch(V){console.log(V)}}),sa=mxUtils.bind(this,function(J){try{this.setDatabaseItem(null,[{title:J.title,size:J.data.length,lastModified:Date.now(),type:J.isLib?"L":"F"},{title:J.title,data:J.data}],ba,ba,["filesInfo","files"])}catch(V){console.log(V)}});
-H=mxUtils.bind(this,function(J){try{if(J.source==P.contentWindow){var V={};try{V=JSON.parse(J.data)}catch(T){}"init"==V.event?(P.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),P.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=V.event||G||(M?null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?(ia=V.resp[0],M=!1,oa()):ha():null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?sa(V.resp[0]):ba())}}catch(T){console.log(T)}});
+document.createElement("iframe");P.style.display="none";P.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(P);var M=!0,G=!1,ia,ja=0,ha=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);P.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ca=mxUtils.bind(this,function(){ja++;oa()}),oa=mxUtils.bind(this,function(){try{if(ja>=ia.length)ha();else{var J=
+ia[ja];StorageFile.getFileContent(this,J,mxUtils.bind(this,function(V){null==V||".scratchpad"==J&&V==this.emptyLibraryXml?P.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[J]}),"*"):ca()}),ca)}}catch(V){console.log(V)}}),sa=mxUtils.bind(this,function(J){try{this.setDatabaseItem(null,[{title:J.title,size:J.data.length,lastModified:Date.now(),type:J.isLib?"L":"F"},{title:J.title,data:J.data}],ca,ca,["filesInfo","files"])}catch(V){console.log(V)}});
+H=mxUtils.bind(this,function(J){try{if(J.source==P.contentWindow){var V={};try{V=JSON.parse(J.data)}catch(T){}"init"==V.event?(P.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),P.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=V.event||G||(M?null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?(ia=V.resp[0],M=!1,oa()):ha():null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?sa(V.resp[0]):ca())}}catch(T){console.log(T)}});
window.addEventListener("message",H)}})));d(A);A.onversionchange=function(){A.close()}});u.onerror=f;u.onblocked=function(){}}catch(x){null!=f&&f(x)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,u,x){this.openDatabase(mxUtils.bind(this,function(A){try{x=x||"objects";Array.isArray(x)||(x=[x],d=[d],f=[f]);var H=A.transaction(x,"readwrite");H.oncomplete=g;H.onerror=u;for(A=0;A<x.length;A++)H.objectStore(x[A]).put(null!=d&&null!=d[A]?{key:d[A],data:f[A]}:f[A])}catch(P){null!=
u&&u(P)}}),u)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,u){this.openDatabase(mxUtils.bind(this,function(x){u=u||"objects";Array.isArray(u)||(u=[u],d=[d]);x=x.transaction(u,"readwrite");x.oncomplete=f;x.onerror=g;for(var A=0;A<u.length;A++)x.objectStore(u[A]).delete(d[A])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,u){this.openDatabase(mxUtils.bind(this,function(x){try{u=u||"objects";var A=x.transaction([u],"readonly").objectStore(u).get(d);A.onsuccess=function(){f(A.result)};
A.onerror=g}catch(H){null!=g&&g(H)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(u){try{g=g||"objects";var x=u.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),A=[];x.onsuccess=function(H){null==H.target.result?d(A):(A.push(H.target.result.value),H.target.result.continue())};x.onerror=f}catch(H){null!=f&&f(H)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(u){try{g=
@@ -3887,32 +3887,32 @@ g||"objects";var x=u.transaction([g],"readonly").objectStore(g).getAllKeys();x.o
!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var u=this.getCurrentFile();null!=u?u.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();
return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==
DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,u,x,A,H,P){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,u,x,A,H,P)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};
-EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha,ba,oa,
-sa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,u,x,A,H,P,M,G,ia,ja,ha,ba,oa,sa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,u){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,u)};EditorUi.prototype.convertImageToDataUri=function(d,
+EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,u,x,A,H,P,M,G,ia,ja,ha,ca,oa,
+sa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,u,x,A,H,P,M,G,ia,ja,ha,ca,oa,sa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,u){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,u)};EditorUi.prototype.convertImageToDataUri=function(d,
f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,u){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,u)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=
function(d,f,g,u,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,u,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),u=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<u.length){var x="<mxfile "===u.substring(0,8)||"<?xml"===u.substring(0,
5)||"\x3c!--[if IE]>"===u.substring(0,12);u="<mxlibrary>"===u.substring(0,11);(x||u)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,l,B,q){function D(){for(var ba=H.getElementsByTagName("div"),oa=0,sa=0;sa<ba.length;sa++)"none"!=ba[sa].style.display&&ba[sa].parentNode==H&&oa++;P.style.display=0==oa?"block":"none"}function N(ba,oa,sa,J){function V(){oa.removeChild(Y);oa.removeChild(p);ca.style.display="block";T.style.display="block"}u={div:oa,comment:ba,saveCallback:sa,deleteOnCancel:J};var T=oa.querySelector(".geCommentTxt"),ca=oa.querySelector(".geCommentActionsList"),Y=document.createElement("textarea");
-Y.className="geCommentEditTxtArea";Y.style.minHeight=T.offsetHeight+"px";Y.value=ba.content;oa.insertBefore(Y,T);var p=document.createElement("div");p.className="geCommentEditBtns";var E=mxUtils.button(mxResources.get("cancel"),function(){J?(oa.parentNode.removeChild(oa),D()):V();u=null});E.className="geCommentEditBtn";p.appendChild(E);var Q=mxUtils.button(mxResources.get("save"),function(){T.innerText="";ba.content=Y.value;mxUtils.write(T,ba.content);V();sa(ba);u=null});mxEvent.addListener(Y,"keydown",
-mxUtils.bind(this,function(Z){mxEvent.isConsumed(Z)||((mxEvent.isControlDown(Z)||mxClient.IS_MAC&&mxEvent.isMetaDown(Z))&&13==Z.keyCode?(Q.click(),mxEvent.consume(Z)):27==Z.keyCode&&(E.click(),mxEvent.consume(Z)))}));Q.focus();Q.className="geCommentEditBtn gePrimaryBtn";p.appendChild(Q);oa.insertBefore(p,T);ca.style.display="none";T.style.display="none";Y.focus()}function S(ba,oa){oa.innerText="";ba=new Date(ba.modifiedDate);var sa=b.timeSince(ba);null==sa&&(sa=mxResources.get("lessThanAMinute"));
-mxUtils.write(oa,mxResources.get("timeAgo",[sa],"{1} ago"));oa.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function F(ba){var oa=document.createElement("img");oa.className="geCommentBusyImg";oa.src=IMAGE_PATH+"/spin.gif";ba.appendChild(oa);ba.busyImg=oa}function K(ba){ba.style.border="1px solid red";ba.removeChild(ba.busyImg)}function R(ba){ba.style.border="";ba.removeChild(ba.busyImg)}function d(ba,oa,sa,J,V){function T(X,da,la){var pa=document.createElement("li");pa.className=
-"geCommentAction";var ma=document.createElement("a");ma.className="geCommentActionLnk";mxUtils.write(ma,X);pa.appendChild(ma);mxEvent.addListener(ma,"click",function(qa){da(qa,ba);qa.preventDefault();mxEvent.consume(qa)});W.appendChild(pa);la&&(pa.style.display="none")}function ca(){function X(pa){da.push(la);if(null!=pa.replies)for(var ma=0;ma<pa.replies.length;ma++)la=la.nextSibling,X(pa.replies[ma])}var da=[],la=p;X(ba);return{pdiv:la,replies:da}}function Y(X,da,la,pa,ma){function qa(){F(ta);ba.addReply(ra,
-function(Aa){ra.id=Aa;ba.replies.push(ra);R(ta);la&&la()},function(Aa){za();K(ta);b.handleError(Aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},pa,ma)}function za(){N(ra,ta,function(Aa){qa()},!0)}var ya=ca().pdiv,ra=b.newComment(X,b.getCurrentUser());ra.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var ta=d(ra,ba.replies,ya,J+1);da?za():qa()}if(V||!ba.isResolved){P.style.display="none";var p=document.createElement("div");p.className="geCommentContainer";p.setAttribute("data-commentId",
-ba.id);p.style.marginLeft=20*J+5+"px";ba.isResolved&&!Editor.isDarkMode()&&(p.style.backgroundColor="ghostWhite");var E=document.createElement("div");E.className="geCommentHeader";var Q=document.createElement("img");Q.className="geCommentUserImg";Q.src=ba.user.pictureUrl||Editor.userImage;E.appendChild(Q);Q=document.createElement("div");Q.className="geCommentHeaderTxt";E.appendChild(Q);var Z=document.createElement("div");Z.className="geCommentUsername";mxUtils.write(Z,ba.user.displayName||"");Q.appendChild(Z);
-Z=document.createElement("div");Z.className="geCommentDate";Z.setAttribute("data-commentId",ba.id);S(ba,Z);Q.appendChild(Z);p.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,ba.content||"");p.appendChild(E);ba.isLocked&&(p.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";E.appendChild(W);f||ba.isLocked||0!=J&&!g||T(mxResources.get("reply"),function(){Y("",
-!0)},ba.isResolved);Q=b.getCurrentUser();null==Q||Q.id!=ba.user.id||f||ba.isLocked||(T(mxResources.get("edit"),function(){function X(){N(ba,p,function(){F(p);ba.editComment(ba.content,function(){R(p)},function(da){K(p);X();b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}X()},ba.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){F(p);ba.deleteComment(function(X){if(!0===X){X=p.querySelector(".geCommentTxt");
-X.innerText="";mxUtils.write(X,mxResources.get("msgDeleted"));var da=p.querySelectorAll(".geCommentAction");for(X=0;X<da.length;X++)da[X].parentNode.removeChild(da[X]);R(p);p.style.opacity="0.5"}else{da=ca(ba).replies;for(X=0;X<da.length;X++)H.removeChild(da[X]);for(X=0;X<oa.length;X++)if(oa[X]==ba){oa.splice(X,1);break}P.style.display=0==H.getElementsByTagName("div").length?"block":"none"}},function(X){K(p);b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-ba.isResolved));f||ba.isLocked||0!=J||T(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(X){function da(){var la=X.target;la.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(la,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var pa=ba.isResolved?"none":"",ma=ca(ba).replies,qa=Editor.isDarkMode()?"transparent":ba.isResolved?"ghostWhite":"white",za=0;za<ma.length;za++){ma[za].style.backgroundColor=qa;for(var ya=ma[za].querySelectorAll(".geCommentAction"),
-ra=0;ra<ya.length;ra++)ya[ra]!=la.parentNode&&(ya[ra].style.display=pa);ia||(ma[za].style.display="none")}D()}ba.isResolved?Y(mxResources.get("reOpened")+": ",!0,da,!1,!0):Y(mxResources.get("markedAsResolved"),!1,da,!0)});p.appendChild(E);null!=sa?H.insertBefore(p,sa.nextSibling):H.appendChild(p);for(sa=0;null!=ba.replies&&sa<ba.replies.length;sa++)E=ba.replies[sa],E.isResolved=ba.isResolved,d(E,ba.replies,null,J+1,V);null!=u&&(u.comment.id==ba.id?(V=ba.content,ba.content=u.comment.content,N(ba,p,
-u.saveCallback,u.deleteOnCancel),ba.content=V):null==u.comment.id&&u.comment.pCommentId==ba.id&&(H.appendChild(u.div),N(u.comment,u.div,u.saveCallback,u.deleteOnCancel)));return p}}var f=!b.canComment(),g=b.canReplyToReplies(),u=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var A=EditorUi.compactUi?"26px":"30px",H=document.createElement("div");H.className="geCommentsList";H.style.backgroundColor=Editor.isDarkMode()?
+var CommentsWindow=function(b,e,k,l,B,q){function D(){for(var ca=H.getElementsByTagName("div"),oa=0,sa=0;sa<ca.length;sa++)"none"!=ca[sa].style.display&&ca[sa].parentNode==H&&oa++;P.style.display=0==oa?"block":"none"}function N(ca,oa,sa,J){function V(){oa.removeChild(Y);oa.removeChild(p);ba.style.display="block";T.style.display="block"}u={div:oa,comment:ca,saveCallback:sa,deleteOnCancel:J};var T=oa.querySelector(".geCommentTxt"),ba=oa.querySelector(".geCommentActionsList"),Y=document.createElement("textarea");
+Y.className="geCommentEditTxtArea";Y.style.minHeight=T.offsetHeight+"px";Y.value=ca.content;oa.insertBefore(Y,T);var p=document.createElement("div");p.className="geCommentEditBtns";var E=mxUtils.button(mxResources.get("cancel"),function(){J?(oa.parentNode.removeChild(oa),D()):V();u=null});E.className="geCommentEditBtn";p.appendChild(E);var Q=mxUtils.button(mxResources.get("save"),function(){T.innerText="";ca.content=Y.value;mxUtils.write(T,ca.content);V();sa(ca);u=null});mxEvent.addListener(Y,"keydown",
+mxUtils.bind(this,function(Z){mxEvent.isConsumed(Z)||((mxEvent.isControlDown(Z)||mxClient.IS_MAC&&mxEvent.isMetaDown(Z))&&13==Z.keyCode?(Q.click(),mxEvent.consume(Z)):27==Z.keyCode&&(E.click(),mxEvent.consume(Z)))}));Q.focus();Q.className="geCommentEditBtn gePrimaryBtn";p.appendChild(Q);oa.insertBefore(p,T);ba.style.display="none";T.style.display="none";Y.focus()}function S(ca,oa){oa.innerText="";ca=new Date(ca.modifiedDate);var sa=b.timeSince(ca);null==sa&&(sa=mxResources.get("lessThanAMinute"));
+mxUtils.write(oa,mxResources.get("timeAgo",[sa],"{1} ago"));oa.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function F(ca){var oa=document.createElement("img");oa.className="geCommentBusyImg";oa.src=IMAGE_PATH+"/spin.gif";ca.appendChild(oa);ca.busyImg=oa}function K(ca){ca.style.border="1px solid red";ca.removeChild(ca.busyImg)}function R(ca){ca.style.border="";ca.removeChild(ca.busyImg)}function d(ca,oa,sa,J,V){function T(X,da,la){var pa=document.createElement("li");pa.className=
+"geCommentAction";var ma=document.createElement("a");ma.className="geCommentActionLnk";mxUtils.write(ma,X);pa.appendChild(ma);mxEvent.addListener(ma,"click",function(qa){da(qa,ca);qa.preventDefault();mxEvent.consume(qa)});W.appendChild(pa);la&&(pa.style.display="none")}function ba(){function X(pa){da.push(la);if(null!=pa.replies)for(var ma=0;ma<pa.replies.length;ma++)la=la.nextSibling,X(pa.replies[ma])}var da=[],la=p;X(ca);return{pdiv:la,replies:da}}function Y(X,da,la,pa,ma){function qa(){F(ta);ca.addReply(ra,
+function(Aa){ra.id=Aa;ca.replies.push(ra);R(ta);la&&la()},function(Aa){za();K(ta);b.handleError(Aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},pa,ma)}function za(){N(ra,ta,function(Aa){qa()},!0)}var ya=ba().pdiv,ra=b.newComment(X,b.getCurrentUser());ra.pCommentId=ca.id;null==ca.replies&&(ca.replies=[]);var ta=d(ra,ca.replies,ya,J+1);da?za():qa()}if(V||!ca.isResolved){P.style.display="none";var p=document.createElement("div");p.className="geCommentContainer";p.setAttribute("data-commentId",
+ca.id);p.style.marginLeft=20*J+5+"px";ca.isResolved&&!Editor.isDarkMode()&&(p.style.backgroundColor="ghostWhite");var E=document.createElement("div");E.className="geCommentHeader";var Q=document.createElement("img");Q.className="geCommentUserImg";Q.src=ca.user.pictureUrl||Editor.userImage;E.appendChild(Q);Q=document.createElement("div");Q.className="geCommentHeaderTxt";E.appendChild(Q);var Z=document.createElement("div");Z.className="geCommentUsername";mxUtils.write(Z,ca.user.displayName||"");Q.appendChild(Z);
+Z=document.createElement("div");Z.className="geCommentDate";Z.setAttribute("data-commentId",ca.id);S(ca,Z);Q.appendChild(Z);p.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,ca.content||"");p.appendChild(E);ca.isLocked&&(p.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";E.appendChild(W);f||ca.isLocked||0!=J&&!g||T(mxResources.get("reply"),function(){Y("",
+!0)},ca.isResolved);Q=b.getCurrentUser();null==Q||Q.id!=ca.user.id||f||ca.isLocked||(T(mxResources.get("edit"),function(){function X(){N(ca,p,function(){F(p);ca.editComment(ca.content,function(){R(p)},function(da){K(p);X();b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}X()},ca.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){F(p);ca.deleteComment(function(X){if(!0===X){X=p.querySelector(".geCommentTxt");
+X.innerText="";mxUtils.write(X,mxResources.get("msgDeleted"));var da=p.querySelectorAll(".geCommentAction");for(X=0;X<da.length;X++)da[X].parentNode.removeChild(da[X]);R(p);p.style.opacity="0.5"}else{da=ba(ca).replies;for(X=0;X<da.length;X++)H.removeChild(da[X]);for(X=0;X<oa.length;X++)if(oa[X]==ca){oa.splice(X,1);break}P.style.display=0==H.getElementsByTagName("div").length?"block":"none"}},function(X){K(p);b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+ca.isResolved));f||ca.isLocked||0!=J||T(ca.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(X){function da(){var la=X.target;la.innerText="";ca.isResolved=!ca.isResolved;mxUtils.write(la,ca.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var pa=ca.isResolved?"none":"",ma=ba(ca).replies,qa=Editor.isDarkMode()?"transparent":ca.isResolved?"ghostWhite":"white",za=0;za<ma.length;za++){ma[za].style.backgroundColor=qa;for(var ya=ma[za].querySelectorAll(".geCommentAction"),
+ra=0;ra<ya.length;ra++)ya[ra]!=la.parentNode&&(ya[ra].style.display=pa);ia||(ma[za].style.display="none")}D()}ca.isResolved?Y(mxResources.get("reOpened")+": ",!0,da,!1,!0):Y(mxResources.get("markedAsResolved"),!1,da,!0)});p.appendChild(E);null!=sa?H.insertBefore(p,sa.nextSibling):H.appendChild(p);for(sa=0;null!=ca.replies&&sa<ca.replies.length;sa++)E=ca.replies[sa],E.isResolved=ca.isResolved,d(E,ca.replies,null,J+1,V);null!=u&&(u.comment.id==ca.id?(V=ca.content,ca.content=u.comment.content,N(ca,p,
+u.saveCallback,u.deleteOnCancel),ca.content=V):null==u.comment.id&&u.comment.pCommentId==ca.id&&(H.appendChild(u.div),N(u.comment,u.div,u.saveCallback,u.deleteOnCancel)));return p}}var f=!b.canComment(),g=b.canReplyToReplies(),u=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var A=EditorUi.compactUi?"26px":"30px",H=document.createElement("div");H.className="geCommentsList";H.style.backgroundColor=Editor.isDarkMode()?
Dialog.backdropColor:"whiteSmoke";H.style.bottom=parseInt(A)+7+"px";x.appendChild(H);var P=document.createElement("span");P.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(P,mxResources.get("noCommentsFound"));var M=document.createElement("div");M.className="geToolbarContainer geCommentsToolbar";M.style.height=A;M.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";M.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";A=document.createElement("a");
-A.className="geButton";if(!f){var G=A.cloneNode();G.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(ba){function oa(){N(sa,J,function(V){F(J);b.addComment(V,function(T){V.id=T;ja.push(V);R(J)},function(T){K(J);oa();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var sa=b.newComment("",b.getCurrentUser()),J=d(sa,ja,null,0);
-oa();ba.preventDefault();mxEvent.consume(ba)});M.appendChild(G)}G=A.cloneNode();G.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';G.setAttribute("title",mxResources.get("showResolved"));G.className="geAdaptiveAsset";var ia=!1;mxEvent.addListener(G,"click",function(ba){this.className=(ia=!ia)?"geButton geCheckedBtn":"geButton";ha();ba.preventDefault();mxEvent.consume(ba)});M.appendChild(G);b.commentsRefreshNeeded()&&(G=A.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+
-'/update16.png" style="width: 16px; padding: 2px;">',G.setAttribute("title",mxResources.get("refresh")),G.className="geAdaptiveAsset",mxEvent.addListener(G,"click",function(ba){ha();ba.preventDefault();mxEvent.consume(ba)}),M.appendChild(G));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="geAdaptiveAsset",mxEvent.addListener(A,"click",function(ba){q();ba.preventDefault();
-mxEvent.consume(ba)}),M.appendChild(A));x.appendChild(M);var ja=[],ha=mxUtils.bind(this,function(){this.hasError=!1;if(null!=u)try{u.div=u.div.cloneNode(!0);var ba=u.div.querySelector(".geCommentEditTxtArea"),oa=u.div.querySelector(".geCommentEditBtns");u.comment.content=ba.value;ba.parentNode.removeChild(ba);oa.parentNode.removeChild(oa)}catch(sa){b.handleError(sa)}H.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
-"...</div>";g=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(sa){function J(V){if(null!=V){V.sort(function(ca,Y){return new Date(ca.modifiedDate)-new Date(Y.modifiedDate)});for(var T=0;T<V.length;T++)J(V[T].replies)}}sa.sort(function(V,T){return new Date(V.modifiedDate)-new Date(T.modifiedDate)});H.innerText="";H.appendChild(P);P.style.display="block";ja=sa;for(sa=0;sa<ja.length;sa++)J(ja[sa].replies),d(ja[sa],ja,null,0,ia);null!=u&&null==u.comment.id&&null==u.comment.pCommentId&&
-(H.appendChild(u.div),N(u.comment,u.div,u.saveCallback,u.deleteOnCancel))},mxUtils.bind(this,function(sa){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(sa&&sa.message?": "+sa.message:""));this.hasError=!0})):H.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ha();this.refreshComments=ha;M=mxUtils.bind(this,function(){function ba(T){var ca=sa[T.id];if(null!=ca)for(S(T,ca),ca=0;null!=T.replies&&ca<T.replies.length;ca++)ba(T.replies[ca])}if(this.window.isVisible()){for(var oa=
-H.querySelectorAll(".geCommentDate"),sa={},J=0;J<oa.length;J++){var V=oa[J];sa[V.getAttribute("data-commentId")]=V}for(J=0;J<ja.length;J++)ba(ja[J])}});setInterval(M,6E4);this.refreshCommentsTime=M;this.window=new mxWindow(mxResources.get("comments"),x,e,k,l,B,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+A.className="geButton";if(!f){var G=A.cloneNode();G.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(ca){function oa(){N(sa,J,function(V){F(J);b.addComment(V,function(T){V.id=T;ja.push(V);R(J)},function(T){K(J);oa();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var sa=b.newComment("",b.getCurrentUser()),J=d(sa,ja,null,0);
+oa();ca.preventDefault();mxEvent.consume(ca)});M.appendChild(G)}G=A.cloneNode();G.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';G.setAttribute("title",mxResources.get("showResolved"));G.className="geAdaptiveAsset";var ia=!1;mxEvent.addListener(G,"click",function(ca){this.className=(ia=!ia)?"geButton geCheckedBtn":"geButton";ha();ca.preventDefault();mxEvent.consume(ca)});M.appendChild(G);b.commentsRefreshNeeded()&&(G=A.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+
+'/update16.png" style="width: 16px; padding: 2px;">',G.setAttribute("title",mxResources.get("refresh")),G.className="geAdaptiveAsset",mxEvent.addListener(G,"click",function(ca){ha();ca.preventDefault();mxEvent.consume(ca)}),M.appendChild(G));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="geAdaptiveAsset",mxEvent.addListener(A,"click",function(ca){q();ca.preventDefault();
+mxEvent.consume(ca)}),M.appendChild(A));x.appendChild(M);var ja=[],ha=mxUtils.bind(this,function(){this.hasError=!1;if(null!=u)try{u.div=u.div.cloneNode(!0);var ca=u.div.querySelector(".geCommentEditTxtArea"),oa=u.div.querySelector(".geCommentEditBtns");u.comment.content=ca.value;ca.parentNode.removeChild(ca);oa.parentNode.removeChild(oa)}catch(sa){b.handleError(sa)}H.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
+"...</div>";g=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(sa){function J(V){if(null!=V){V.sort(function(ba,Y){return new Date(ba.modifiedDate)-new Date(Y.modifiedDate)});for(var T=0;T<V.length;T++)J(V[T].replies)}}sa.sort(function(V,T){return new Date(V.modifiedDate)-new Date(T.modifiedDate)});H.innerText="";H.appendChild(P);P.style.display="block";ja=sa;for(sa=0;sa<ja.length;sa++)J(ja[sa].replies),d(ja[sa],ja,null,0,ia);null!=u&&null==u.comment.id&&null==u.comment.pCommentId&&
+(H.appendChild(u.div),N(u.comment,u.div,u.saveCallback,u.deleteOnCancel))},mxUtils.bind(this,function(sa){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(sa&&sa.message?": "+sa.message:""));this.hasError=!0})):H.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ha();this.refreshComments=ha;M=mxUtils.bind(this,function(){function ca(T){var ba=sa[T.id];if(null!=ba)for(S(T,ba),ba=0;null!=T.replies&&ba<T.replies.length;ba++)ca(T.replies[ba])}if(this.window.isVisible()){for(var oa=
+H.querySelectorAll(".geCommentDate"),sa={},J=0;J<oa.length;J++){var V=oa[J];sa[V.getAttribute("data-commentId")]=V}for(J=0;J<ja.length;J++)ca(ja[J])}});setInterval(M,6E4);this.refreshCommentsTime=M;this.window=new mxWindow(mxResources.get("comments"),x,e,k,l,B,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,l,B,q,D,N,S,F,K){var R=document.createElement("div");R.style.textAlign="center";K=null!=K?K:44;var d=document.createElement("div");d.style.padding="6px";d.style.overflow="auto";d.style.maxHeight=K+"px";d.style.lineHeight="1.2em";mxUtils.write(d,e);R.appendChild(d);null!=F&&(d=document.createElement("div"),d.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
F),d.appendChild(e),R.appendChild(d));F=document.createElement("div");F.style.textAlign="center";F.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");q=mxUtils.button(q||mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l(f.checked)});q.className="geBtn";null!=N&&(q.innerHTML=N+"<br>"+q.innerHTML,q.style.paddingBottom="8px",q.style.paddingTop="8px",q.style.height="auto",q.style.width="40%");b.editor.cancelFirst&&F.appendChild(q);var g=mxUtils.button(B||
mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(f.checked)});F.appendChild(g);null!=D?(g.innerHTML=D+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||F.appendChild(q);R.appendChild(F);S?(F.style.marginTop="10px",d=document.createElement("p"),d.style.marginTop="20px",d.style.marginBottom="0px",d.appendChild(f),B=document.createElement("span"),
@@ -3992,32 +3992,32 @@ l));return l};b.beforeDecode=function(e,k,l){l.ui=e.ui;l.relatedPage=l.ui.getPag
function(l,B){this.model.beginUpdate();try{var q=[];this.traverse(B,!0,mxUtils.bind(this,function(N,S){var F=null!=S&&this.isTreeEdge(S);F&&q.push(S);N==B||null!=S&&!F||q.push(N);return(null==S||F)&&(N==B||!this.model.isCollapsed(N))}));this.model.setCollapsed(B,l);for(var D=0;D<q.length;D++)this.model.setVisible(q[D],!l)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(l){return!this.isEdgeIgnored(l)};Graph.prototype.getTreeEdges=function(l,B,q,D,N,S){return this.model.filterCells(this.getEdges(l,
B,q,D,N,S),mxUtils.bind(this,function(F){return this.isTreeEdge(F)}))};Graph.prototype.getIncomingTreeEdges=function(l,B){return this.getTreeEdges(l,B,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(l,B){return this.getTreeEdges(l,B,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function l(J){return u.isVertex(J)&&q(J)}function B(J){var V=
!1;null!=J&&(V="1"==g.getCurrentCellStyle(J).treeMoving);return V}function q(J){var V=!1;null!=J&&(J=u.getParent(J),V=g.view.getState(J),V="tree"==(null!=V?V.style:g.getCellStyle(J)).containerType);return V}function D(J){var V=!1;null!=J&&(J=u.getParent(J),V=g.view.getState(J),g.view.getState(J),V=null!=(null!=V?V.style:g.getCellStyle(J)).childLayout);return V}function N(J){J=g.view.getState(J);if(null!=J){var V=g.getIncomingTreeEdges(J.cell);if(0<V.length&&(V=g.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
-null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==J.y&&Math.abs(V.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==J.y+J.height&&Math.abs(V.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>J.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(J,V){V=null!=V?V:!0;g.model.beginUpdate();try{var T=g.model.getParent(J),ca=g.getIncomingTreeEdges(J),Y=g.cloneCells([ca[0],J]);g.model.setTerminal(Y[0],g.model.getTerminal(ca[0],
+null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==J.y&&Math.abs(V.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==J.y+J.height&&Math.abs(V.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>J.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(J,V){V=null!=V?V:!0;g.model.beginUpdate();try{var T=g.model.getParent(J),ba=g.getIncomingTreeEdges(J),Y=g.cloneCells([ba[0],J]);g.model.setTerminal(Y[0],g.model.getTerminal(ba[0],
!0),!0);var p=N(J),E=T.geometry;p==mxConstants.DIRECTION_SOUTH||p==mxConstants.DIRECTION_NORTH?Y[1].geometry.x+=V?J.geometry.width+10:-Y[1].geometry.width-10:Y[1].geometry.y+=V?J.geometry.height+10:-Y[1].geometry.height-10;g.view.currentRoot!=T&&(Y[1].geometry.x-=E.x,Y[1].geometry.y-=E.y);var Q=g.view.getState(J),Z=g.view.scale;if(null!=Q){var W=mxRectangle.fromRectangle(Q);p==mxConstants.DIRECTION_SOUTH||p==mxConstants.DIRECTION_NORTH?W.x+=(V?J.geometry.width+10:-Y[1].geometry.width-10)*Z:W.y+=(V?
-J.geometry.height+10:-Y[1].geometry.height-10)*Z;var X=g.getOutgoingTreeEdges(g.model.getTerminal(ca[0],!0));if(null!=X){for(var da=p==mxConstants.DIRECTION_SOUTH||p==mxConstants.DIRECTION_NORTH,la=E=ca=0;la<X.length;la++){var pa=g.model.getTerminal(X[la],!1);if(p==N(pa)){var ma=g.view.getState(pa);pa!=J&&null!=ma&&(da&&V!=ma.getCenterX()<Q.getCenterX()||!da&&V!=ma.getCenterY()<Q.getCenterY())&&mxUtils.intersects(W,ma)&&(ca=10+Math.max(ca,(Math.min(W.x+W.width,ma.x+ma.width)-Math.max(W.x,ma.x))/Z),
-E=10+Math.max(E,(Math.min(W.y+W.height,ma.y+ma.height)-Math.max(W.y,ma.y))/Z))}}da?E=0:ca=0;for(la=0;la<X.length;la++)if(pa=g.model.getTerminal(X[la],!1),p==N(pa)&&(ma=g.view.getState(pa),pa!=J&&null!=ma&&(da&&V!=ma.getCenterX()<Q.getCenterX()||!da&&V!=ma.getCenterY()<Q.getCenterY()))){var qa=[];g.traverse(ma.cell,!0,function(za,ya){var ra=null!=ya&&g.isTreeEdge(ya);ra&&qa.push(ya);(null==ya||ra)&&qa.push(za);return null==ya||ra});g.moveCells(qa,(V?1:-1)*ca,(V?1:-1)*E)}}}return g.addCells(Y,T)}finally{g.model.endUpdate()}}
-function F(J){g.model.beginUpdate();try{var V=N(J),T=g.getIncomingTreeEdges(J),ca=g.cloneCells([T[0],J]);g.model.setTerminal(T[0],ca[1],!1);g.model.setTerminal(ca[0],ca[1],!0);g.model.setTerminal(ca[0],J,!1);var Y=g.model.getParent(J),p=Y.geometry,E=[];g.view.currentRoot!=Y&&(ca[1].geometry.x-=p.x,ca[1].geometry.y-=p.y);g.traverse(J,!0,function(W,X){var da=null!=X&&g.isTreeEdge(X);da&&E.push(X);(null==X||da)&&E.push(W);return null==X||da});var Q=J.geometry.width+40,Z=J.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?
-Q=0:V==mxConstants.DIRECTION_NORTH?(Q=0,Z=-Z):V==mxConstants.DIRECTION_WEST?(Q=-Q,Z=0):V==mxConstants.DIRECTION_EAST&&(Z=0);g.moveCells(E,Q,Z);return g.addCells(ca,Y)}finally{g.model.endUpdate()}}function K(J,V){g.model.beginUpdate();try{var T=g.model.getParent(J),ca=g.getIncomingTreeEdges(J),Y=N(J);0==ca.length&&(ca=[g.createEdge(T,null,"",null,null,g.createCurrentEdgeStyle())],Y=V);var p=g.cloneCells([ca[0],J]);g.model.setTerminal(p[0],J,!0);if(null==g.model.getTerminal(p[0],!1)){g.model.setTerminal(p[0],
-p[1],!1);var E=g.getCellStyle(p[1]).newEdgeStyle;if(null!=E)try{var Q=JSON.parse(E),Z;for(Z in Q)g.setCellStyles(Z,Q[Z],[p[0]]),"edgeStyle"==Z&&"elbowEdgeStyle"==Q[Z]&&g.setCellStyles("elbow",Y==mxConstants.DIRECTION_SOUTH||Y==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[p[0]])}catch(ma){}}ca=g.getOutgoingTreeEdges(J);var W=T.geometry;V=[];g.view.currentRoot==T&&(W=new mxRectangle);for(E=0;E<ca.length;E++){var X=g.model.getTerminal(ca[E],!1);null!=X&&V.push(X)}var da=g.view.getBounds(V),la=
+J.geometry.height+10:-Y[1].geometry.height-10)*Z;var X=g.getOutgoingTreeEdges(g.model.getTerminal(ba[0],!0));if(null!=X){for(var da=p==mxConstants.DIRECTION_SOUTH||p==mxConstants.DIRECTION_NORTH,la=E=ba=0;la<X.length;la++){var pa=g.model.getTerminal(X[la],!1);if(p==N(pa)){var ma=g.view.getState(pa);pa!=J&&null!=ma&&(da&&V!=ma.getCenterX()<Q.getCenterX()||!da&&V!=ma.getCenterY()<Q.getCenterY())&&mxUtils.intersects(W,ma)&&(ba=10+Math.max(ba,(Math.min(W.x+W.width,ma.x+ma.width)-Math.max(W.x,ma.x))/Z),
+E=10+Math.max(E,(Math.min(W.y+W.height,ma.y+ma.height)-Math.max(W.y,ma.y))/Z))}}da?E=0:ba=0;for(la=0;la<X.length;la++)if(pa=g.model.getTerminal(X[la],!1),p==N(pa)&&(ma=g.view.getState(pa),pa!=J&&null!=ma&&(da&&V!=ma.getCenterX()<Q.getCenterX()||!da&&V!=ma.getCenterY()<Q.getCenterY()))){var qa=[];g.traverse(ma.cell,!0,function(za,ya){var ra=null!=ya&&g.isTreeEdge(ya);ra&&qa.push(ya);(null==ya||ra)&&qa.push(za);return null==ya||ra});g.moveCells(qa,(V?1:-1)*ba,(V?1:-1)*E)}}}return g.addCells(Y,T)}finally{g.model.endUpdate()}}
+function F(J){g.model.beginUpdate();try{var V=N(J),T=g.getIncomingTreeEdges(J),ba=g.cloneCells([T[0],J]);g.model.setTerminal(T[0],ba[1],!1);g.model.setTerminal(ba[0],ba[1],!0);g.model.setTerminal(ba[0],J,!1);var Y=g.model.getParent(J),p=Y.geometry,E=[];g.view.currentRoot!=Y&&(ba[1].geometry.x-=p.x,ba[1].geometry.y-=p.y);g.traverse(J,!0,function(W,X){var da=null!=X&&g.isTreeEdge(X);da&&E.push(X);(null==X||da)&&E.push(W);return null==X||da});var Q=J.geometry.width+40,Z=J.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?
+Q=0:V==mxConstants.DIRECTION_NORTH?(Q=0,Z=-Z):V==mxConstants.DIRECTION_WEST?(Q=-Q,Z=0):V==mxConstants.DIRECTION_EAST&&(Z=0);g.moveCells(E,Q,Z);return g.addCells(ba,Y)}finally{g.model.endUpdate()}}function K(J,V){g.model.beginUpdate();try{var T=g.model.getParent(J),ba=g.getIncomingTreeEdges(J),Y=N(J);0==ba.length&&(ba=[g.createEdge(T,null,"",null,null,g.createCurrentEdgeStyle())],Y=V);var p=g.cloneCells([ba[0],J]);g.model.setTerminal(p[0],J,!0);if(null==g.model.getTerminal(p[0],!1)){g.model.setTerminal(p[0],
+p[1],!1);var E=g.getCellStyle(p[1]).newEdgeStyle;if(null!=E)try{var Q=JSON.parse(E),Z;for(Z in Q)g.setCellStyles(Z,Q[Z],[p[0]]),"edgeStyle"==Z&&"elbowEdgeStyle"==Q[Z]&&g.setCellStyles("elbow",Y==mxConstants.DIRECTION_SOUTH||Y==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[p[0]])}catch(ma){}}ba=g.getOutgoingTreeEdges(J);var W=T.geometry;V=[];g.view.currentRoot==T&&(W=new mxRectangle);for(E=0;E<ba.length;E++){var X=g.model.getTerminal(ba[E],!1);null!=X&&V.push(X)}var da=g.view.getBounds(V),la=
g.view.translate,pa=g.view.scale;Y==mxConstants.DIRECTION_SOUTH?(p[1].geometry.x=null==da?J.geometry.x+(J.geometry.width-p[1].geometry.width)/2:(da.x+da.width)/pa-la.x-W.x+10,p[1].geometry.y+=p[1].geometry.height-W.y+40):Y==mxConstants.DIRECTION_NORTH?(p[1].geometry.x=null==da?J.geometry.x+(J.geometry.width-p[1].geometry.width)/2:(da.x+da.width)/pa-la.x+-W.x+10,p[1].geometry.y-=p[1].geometry.height+W.y+40):(p[1].geometry.x=Y==mxConstants.DIRECTION_WEST?p[1].geometry.x-(p[1].geometry.width+W.x+40):
-p[1].geometry.x+(p[1].geometry.width-W.x+40),p[1].geometry.y=null==da?J.geometry.y+(J.geometry.height-p[1].geometry.height)/2:(da.y+da.height)/pa-la.y+-W.y+10);return g.addCells(p,T)}finally{g.model.endUpdate()}}function R(J,V,T){J=g.getOutgoingTreeEdges(J);T=g.view.getState(T);var ca=[];if(null!=T&&null!=J){for(var Y=0;Y<J.length;Y++){var p=g.view.getState(g.model.getTerminal(J[Y],!1));null!=p&&(!V&&Math.min(p.x+p.width,T.x+T.width)>=Math.max(p.x,T.x)||V&&Math.min(p.y+p.height,T.y+T.height)>=Math.max(p.y,
-T.y))&&ca.push(p)}ca.sort(function(E,Q){return V?E.x+E.width-Q.x-Q.width:E.y+E.height-Q.y-Q.height})}return ca}function d(J,V){var T=N(J),ca=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==ca&&T!=V?f.actions.get("selectParent").funct():T==V?(V=g.getOutgoingTreeEdges(J),null!=V&&0<V.length&&g.setSelectionCell(g.model.getTerminal(V[0],!1))):(T=g.getIncomingTreeEdges(J),null!=T&&0<T.length&&(ca=R(g.model.getTerminal(T[0],!0),
-ca,J),J=g.view.getState(J),null!=J&&(J=mxUtils.indexOf(ca,J),0<=J&&(J+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=ca.length-1&&g.setSelectionCell(ca[J].cell)))))}var f=this,g=f.editor.graph,u=g.getModel(),x=f.menus.createPopupMenu;f.menus.createPopupMenu=function(J,V,T){x.apply(this,arguments);if(1==g.getSelectionCount()){V=g.getSelectionCell();var ca=g.getOutgoingTreeEdges(V);J.addSeparator();0<ca.length&&(l(g.getSelectionCell())&&this.addMenuItems(J,["selectChildren"],
+p[1].geometry.x+(p[1].geometry.width-W.x+40),p[1].geometry.y=null==da?J.geometry.y+(J.geometry.height-p[1].geometry.height)/2:(da.y+da.height)/pa-la.y+-W.y+10);return g.addCells(p,T)}finally{g.model.endUpdate()}}function R(J,V,T){J=g.getOutgoingTreeEdges(J);T=g.view.getState(T);var ba=[];if(null!=T&&null!=J){for(var Y=0;Y<J.length;Y++){var p=g.view.getState(g.model.getTerminal(J[Y],!1));null!=p&&(!V&&Math.min(p.x+p.width,T.x+T.width)>=Math.max(p.x,T.x)||V&&Math.min(p.y+p.height,T.y+T.height)>=Math.max(p.y,
+T.y))&&ba.push(p)}ba.sort(function(E,Q){return V?E.x+E.width-Q.x-Q.width:E.y+E.height-Q.y-Q.height})}return ba}function d(J,V){var T=N(J),ba=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==ba&&T!=V?f.actions.get("selectParent").funct():T==V?(V=g.getOutgoingTreeEdges(J),null!=V&&0<V.length&&g.setSelectionCell(g.model.getTerminal(V[0],!1))):(T=g.getIncomingTreeEdges(J),null!=T&&0<T.length&&(ba=R(g.model.getTerminal(T[0],!0),
+ba,J),J=g.view.getState(J),null!=J&&(J=mxUtils.indexOf(ba,J),0<=J&&(J+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=ba.length-1&&g.setSelectionCell(ba[J].cell)))))}var f=this,g=f.editor.graph,u=g.getModel(),x=f.menus.createPopupMenu;f.menus.createPopupMenu=function(J,V,T){x.apply(this,arguments);if(1==g.getSelectionCount()){V=g.getSelectionCell();var ba=g.getOutgoingTreeEdges(V);J.addSeparator();0<ba.length&&(l(g.getSelectionCell())&&this.addMenuItems(J,["selectChildren"],
null,T),this.addMenuItems(J,["selectDescendants"],null,T));l(g.getSelectionCell())?(J.addSeparator(),0<g.getIncomingTreeEdges(V).length&&this.addMenuItems(J,["selectSiblings","selectParent"],null,T)):0<g.model.getEdgeCount(V)&&this.addMenuItems(J,["selectConnections"],null,T)}};f.actions.addAction("selectChildren",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var J=g.getSelectionCell();J=g.getOutgoingTreeEdges(J);if(null!=J){for(var V=[],T=0;T<J.length;T++)V.push(g.model.getTerminal(J[T],
!1));g.setSelectionCells(V)}}},null,null,"Alt+Shift+X");f.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var J=g.getSelectionCell();J=g.getIncomingTreeEdges(J);if(null!=J&&0<J.length&&(J=g.getOutgoingTreeEdges(g.model.getTerminal(J[0],!0)),null!=J)){for(var V=[],T=0;T<J.length;T++)V.push(g.model.getTerminal(J[T],!1));g.setSelectionCells(V)}}},null,null,"Alt+Shift+S");f.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var J=
-g.getSelectionCell();J=g.getIncomingTreeEdges(J);null!=J&&0<J.length&&g.setSelectionCell(g.model.getTerminal(J[0],!0))}},null,null,"Alt+Shift+P");f.actions.addAction("selectDescendants",function(J,V){J=g.getSelectionCell();if(g.isEnabled()&&g.model.isVertex(J)){if(null!=V&&mxEvent.isAltDown(V))g.setSelectionCells(g.model.getTreeEdges(J,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var T=[];g.traverse(J,!0,function(ca,Y){var p=null!=Y&&g.isTreeEdge(Y);p&&T.push(Y);null!=
-Y&&!p||null!=V&&mxEvent.isShiftDown(V)||T.push(ca);return null==Y||p})}g.setSelectionCells(T)}},null,null,"Alt+Shift+D");var A=g.removeCells;g.removeCells=function(J,V){V=null!=V?V:!0;null==J&&(J=this.getDeletableCells(this.getSelectionCells()));V&&(J=this.getDeletableCells(this.addAllEdges(J)));for(var T=[],ca=0;ca<J.length;ca++){var Y=J[ca];u.isEdge(Y)&&q(Y)&&(T.push(Y),Y=u.getTerminal(Y,!1));if(l(Y)){var p=[];g.traverse(Y,!0,function(E,Q){var Z=null!=Q&&g.isTreeEdge(Q);Z&&p.push(Q);(null==Q||Z)&&
-p.push(E);return null==Q||Z});0<p.length&&(T=T.concat(p),Y=g.getIncomingTreeEdges(J[ca]),J=J.concat(Y))}else null!=Y&&T.push(J[ca])}J=T;return A.apply(this,arguments)};f.hoverIcons.getStateAt=function(J,V,T){return l(J.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,T))};var H=g.duplicateCells;g.duplicateCells=function(J,V){J=null!=J?J:this.getSelectionCells();for(var T=J.slice(0),ca=0;ca<T.length;ca++){var Y=g.view.getState(T[ca]);if(null!=Y&&l(Y.cell)){var p=g.getIncomingTreeEdges(Y.cell);
-for(Y=0;Y<p.length;Y++)mxUtils.remove(p[Y],J)}}this.model.beginUpdate();try{var E=H.call(this,J,V);if(E.length==J.length)for(ca=0;ca<J.length;ca++)if(l(J[ca])){var Q=g.getIncomingTreeEdges(E[ca]);p=g.getIncomingTreeEdges(J[ca]);if(0==Q.length&&0<p.length){var Z=this.cloneCell(p[0]);this.addEdge(Z,g.getDefaultParent(),this.model.getTerminal(p[0],!0),E[ca])}}}finally{this.model.endUpdate()}return E};var P=g.moveCells;g.moveCells=function(J,V,T,ca,Y,p,E){var Q=null;this.model.beginUpdate();try{var Z=
+g.getSelectionCell();J=g.getIncomingTreeEdges(J);null!=J&&0<J.length&&g.setSelectionCell(g.model.getTerminal(J[0],!0))}},null,null,"Alt+Shift+P");f.actions.addAction("selectDescendants",function(J,V){J=g.getSelectionCell();if(g.isEnabled()&&g.model.isVertex(J)){if(null!=V&&mxEvent.isAltDown(V))g.setSelectionCells(g.model.getTreeEdges(J,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var T=[];g.traverse(J,!0,function(ba,Y){var p=null!=Y&&g.isTreeEdge(Y);p&&T.push(Y);null!=
+Y&&!p||null!=V&&mxEvent.isShiftDown(V)||T.push(ba);return null==Y||p})}g.setSelectionCells(T)}},null,null,"Alt+Shift+D");var A=g.removeCells;g.removeCells=function(J,V){V=null!=V?V:!0;null==J&&(J=this.getDeletableCells(this.getSelectionCells()));V&&(J=this.getDeletableCells(this.addAllEdges(J)));for(var T=[],ba=0;ba<J.length;ba++){var Y=J[ba];u.isEdge(Y)&&q(Y)&&(T.push(Y),Y=u.getTerminal(Y,!1));if(l(Y)){var p=[];g.traverse(Y,!0,function(E,Q){var Z=null!=Q&&g.isTreeEdge(Q);Z&&p.push(Q);(null==Q||Z)&&
+p.push(E);return null==Q||Z});0<p.length&&(T=T.concat(p),Y=g.getIncomingTreeEdges(J[ba]),J=J.concat(Y))}else null!=Y&&T.push(J[ba])}J=T;return A.apply(this,arguments)};f.hoverIcons.getStateAt=function(J,V,T){return l(J.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,T))};var H=g.duplicateCells;g.duplicateCells=function(J,V){J=null!=J?J:this.getSelectionCells();for(var T=J.slice(0),ba=0;ba<T.length;ba++){var Y=g.view.getState(T[ba]);if(null!=Y&&l(Y.cell)){var p=g.getIncomingTreeEdges(Y.cell);
+for(Y=0;Y<p.length;Y++)mxUtils.remove(p[Y],J)}}this.model.beginUpdate();try{var E=H.call(this,J,V);if(E.length==J.length)for(ba=0;ba<J.length;ba++)if(l(J[ba])){var Q=g.getIncomingTreeEdges(E[ba]);p=g.getIncomingTreeEdges(J[ba]);if(0==Q.length&&0<p.length){var Z=this.cloneCell(p[0]);this.addEdge(Z,g.getDefaultParent(),this.model.getTerminal(p[0],!0),E[ba])}}}finally{this.model.endUpdate()}return E};var P=g.moveCells;g.moveCells=function(J,V,T,ba,Y,p,E){var Q=null;this.model.beginUpdate();try{var Z=
Y,W=this.getCurrentCellStyle(Y);if(null!=J&&l(Y)&&"1"==mxUtils.getValue(W,"treeFolding","0")){for(var X=0;X<J.length;X++)if(l(J[X])||g.model.isEdge(J[X])&&null==g.model.getTerminal(J[X],!0)){Y=g.model.getParent(J[X]);break}if(null!=Z&&Y!=Z&&null!=this.view.getState(J[0])){var da=g.getIncomingTreeEdges(J[0]);if(0<da.length){var la=g.view.getState(g.model.getTerminal(da[0],!0));if(null!=la){var pa=g.view.getState(Z);null!=pa&&(V=(pa.getCenterX()-la.getCenterX())/g.view.scale,T=(pa.getCenterY()-la.getCenterY())/
-g.view.scale)}}}}Q=P.apply(this,arguments);if(null!=Q&&null!=J&&Q.length==J.length)for(X=0;X<Q.length;X++)if(this.model.isEdge(Q[X]))l(Z)&&0>mxUtils.indexOf(Q,this.model.getTerminal(Q[X],!0))&&this.model.setTerminal(Q[X],Z,!0);else if(l(J[X])&&(da=g.getIncomingTreeEdges(J[X]),0<da.length))if(!ca)l(Z)&&0>mxUtils.indexOf(J,this.model.getTerminal(da[0],!0))&&this.model.setTerminal(da[0],Z,!0);else if(0==g.getIncomingTreeEdges(Q[X]).length){W=Z;if(null==W||W==g.model.getParent(J[X]))W=g.model.getTerminal(da[0],
-!0);ca=this.cloneCell(da[0]);this.addEdge(ca,g.getDefaultParent(),W,Q[X])}}finally{this.model.endUpdate()}return Q};if(null!=f.sidebar){var M=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(J,V,T,ca){var Y=g.model,p=null;Y.beginUpdate();try{if(p=M.apply(this,arguments),l(J))for(var E=0;E<p.length;E++)if(Y.isEdge(p[E])&&null==Y.getTerminal(p[E],!0)){Y.setTerminal(p[E],J,!0);var Q=g.getCellGeometry(p[E]);Q.points=null;null!=Q.getTerminalPoint(!0)&&Q.setTerminalPoint(null,!0)}}finally{Y.endUpdate()}return p}}var G=
+g.view.scale)}}}}Q=P.apply(this,arguments);if(null!=Q&&null!=J&&Q.length==J.length)for(X=0;X<Q.length;X++)if(this.model.isEdge(Q[X]))l(Z)&&0>mxUtils.indexOf(Q,this.model.getTerminal(Q[X],!0))&&this.model.setTerminal(Q[X],Z,!0);else if(l(J[X])&&(da=g.getIncomingTreeEdges(J[X]),0<da.length))if(!ba)l(Z)&&0>mxUtils.indexOf(J,this.model.getTerminal(da[0],!0))&&this.model.setTerminal(da[0],Z,!0);else if(0==g.getIncomingTreeEdges(Q[X]).length){W=Z;if(null==W||W==g.model.getParent(J[X]))W=g.model.getTerminal(da[0],
+!0);ba=this.cloneCell(da[0]);this.addEdge(ba,g.getDefaultParent(),W,Q[X])}}finally{this.model.endUpdate()}return Q};if(null!=f.sidebar){var M=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(J,V,T,ba){var Y=g.model,p=null;Y.beginUpdate();try{if(p=M.apply(this,arguments),l(J))for(var E=0;E<p.length;E++)if(Y.isEdge(p[E])&&null==Y.getTerminal(p[E],!0)){Y.setTerminal(p[E],J,!0);var Q=g.getCellGeometry(p[E]);Q.points=null;null!=Q.getTerminalPoint(!0)&&Q.setTerminalPoint(null,!0)}}finally{Y.endUpdate()}return p}}var G=
{88:f.actions.get("selectChildren"),84:f.actions.get("selectSubtree"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ia=f.onKeyDown;f.onKeyDown=function(J){try{if(g.isEnabled()&&!g.isEditing()&&l(g.getSelectionCell())&&1==g.getSelectionCount()){var V=null;0<g.getIncomingTreeEdges(g.getSelectionCell()).length&&(9==J.which?V=mxEvent.isShiftDown(J)?F(g.getSelectionCell()):K(g.getSelectionCell()):13==J.which&&(V=S(g.getSelectionCell(),!mxEvent.isShiftDown(J))));if(null!=V&&0<V.length)1==
V.length&&g.model.isEdge(V[0])?g.setSelectionCell(g.model.getTerminal(V[0],!1)):g.setSelectionCell(V[V.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()),mxEvent.consume(J);else if(mxEvent.isAltDown(J)&&mxEvent.isShiftDown(J)){var T=G[J.keyCode];null!=T&&(T.funct(J),mxEvent.consume(J))}else 37==J.keyCode?(d(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(J)):38==J.keyCode?(d(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),
-mxEvent.consume(J)):39==J.keyCode?(d(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(J)):40==J.keyCode&&(d(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(J))}}catch(ca){f.handleError(ca)}mxEvent.isConsumed(J)||ia.apply(this,arguments)};var ja=g.connectVertex;g.connectVertex=function(J,V,T,ca,Y,p,E){var Q=g.getIncomingTreeEdges(J);if(l(J)){var Z=N(J),W=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST,X=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
-return Z==V||0==Q.length?K(J,V):W==X?F(J):S(J,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return ja.apply(this,arguments)};g.getSubtree=function(J){var V=[J];!B(J)&&!l(J)||D(J)||g.traverse(J,!0,function(T,ca){var Y=null!=ca&&g.isTreeEdge(ca);Y&&0>mxUtils.indexOf(V,ca)&&V.push(ca);(null==ca||Y)&&0>mxUtils.indexOf(V,T)&&V.push(T);return null==ca||Y});return V};var ha=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ha.apply(this,arguments);(B(this.state.cell)||
+mxEvent.consume(J)):39==J.keyCode?(d(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(J)):40==J.keyCode&&(d(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(J))}}catch(ba){f.handleError(ba)}mxEvent.isConsumed(J)||ia.apply(this,arguments)};var ja=g.connectVertex;g.connectVertex=function(J,V,T,ba,Y,p,E){var Q=g.getIncomingTreeEdges(J);if(l(J)){var Z=N(J),W=Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST,X=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
+return Z==V||0==Q.length?K(J,V):W==X?F(J):S(J,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return ja.apply(this,arguments)};g.getSubtree=function(J){var V=[J];!B(J)&&!l(J)||D(J)||g.traverse(J,!0,function(T,ba){var Y=null!=ba&&g.isTreeEdge(ba);Y&&0>mxUtils.indexOf(V,ba)&&V.push(ba);(null==ba||Y)&&0>mxUtils.indexOf(V,T)&&V.push(T);return null==ba||Y});return V};var ha=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ha.apply(this,arguments);(B(this.state.cell)||
l(this.state.cell))&&!D(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(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;f.hoverIcons.reset();mxEvent.consume(J)})))};var ba=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ba.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
+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;f.hoverIcons.reset();mxEvent.consume(J)})))};var ca=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ca.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var oa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(J){oa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=J?"":"none")};var sa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(J,V){sa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==
typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var l=k.apply(this,arguments),B=this.graph;return l.concat([this.addEntry("tree container",function(){var q=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");q.vertex=!0;var D=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
D.vertex=!0;var N=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');N.vertex=!0;var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");S.geometry.relative=!0;S.edge=!0;D.insertEdge(S,!0);N.insertEdge(S,!1);q.insert(S);q.insert(D);q.insert(N);return sb.createVertexTemplateFromCells([q],q.geometry.width,
@@ -4064,16 +4064,16 @@ ya.style.backgroundPosition="right 6px center",ya.style.backgroundRepeat="no-rep
"url("+ra+")",ta.style.backgroundPosition="center center",ta.style.backgroundRepeat="no-repeat",ta.style.backgroundSize="24px 24px",ta.style.width="34px"):mxUtils.write(ta,pa);mxEvent.addListener(ta,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Aa){Aa.preventDefault()}));mxEvent.addListener(ta,"click",function(Aa){"disabled"!=ta.getAttribute("disabled")&&ma(Aa);mxEvent.consume(Aa)});null==qa&&(ta.style.marginRight="4px");null!=za&&ta.setAttribute("title",za);null!=ya&&(pa=
function(){ya.isEnabled()?(ta.removeAttribute("disabled"),ta.style.cursor="pointer"):(ta.setAttribute("disabled","disabled"),ta.style.cursor="default")},ya.addListener("stateChanged",pa),H.addListener("enabledChanged",pa),pa());return ta}function g(pa,ma,qa){qa=document.createElement("div");qa.className="geMenuItem";qa.style.display="inline-block";qa.style.verticalAlign="top";qa.style.marginRight="6px";qa.style.padding="0 4px 0 4px";qa.style.height="30px";qa.style.position="relative";qa.style.top=
"0px";for(var za=0;za<pa.length;za++)null!=pa[za]&&(pa[za].style.margin="0px",pa[za].style.boxShadow="none",qa.appendChild(pa[za]));null!=ma&&mxUtils.setOpacity(qa,ma);null!=A.statusContainer?P.insertBefore(qa,A.statusContainer):P.appendChild(qa);return qa}function u(){for(var pa=P.firstChild;null!=pa;){var ma=pa.nextSibling;"geMenuItem"!=pa.className&&"geItem"!=pa.className||pa.parentNode.removeChild(pa);pa=ma}M=P.firstChild;l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
-pa=1E3>l;var qa=null;pa||(qa=d("diagram"));ma=pa?d("diagram",null,Editor.menuImage):null;null!=ma&&(qa=ma);g([qa,f(mxResources.get("shapes"),A.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),A.actions.get("image"),pa?Editor.shapesImage:null),f(mxResources.get("format"),A.actions.get("format").funct,null,mxResources.get("format")+" ("+A.actions.get("format").shortcut+")",A.actions.get("image"),pa?Editor.formatImage:null)],pa?60:null);ma=d("insert",!0,pa?ba:null);g([ma,f(mxResources.get("delete"),
-A.actions.get("delete").funct,null,mxResources.get("delete"),A.actions.get("delete"),pa?Editor.trashImage:null)],pa?60:null);411<=l&&(g([Q,Z],60),520<=l&&g([W,640<=l?f("",T.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",T,Editor.zoomInImage):null,640<=l?f("",ca.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ca,Editor.zoomOutImage):null],60));null!=qa&&(mxEvent.disableContextMenu(qa),mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(za){(mxEvent.isShiftDown(za)||
+pa=1E3>l;var qa=null;pa||(qa=d("diagram"));ma=pa?d("diagram",null,Editor.menuImage):null;null!=ma&&(qa=ma);g([qa,f(mxResources.get("shapes"),A.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),A.actions.get("image"),pa?Editor.shapesImage:null),f(mxResources.get("format"),A.actions.get("format").funct,null,mxResources.get("format")+" ("+A.actions.get("format").shortcut+")",A.actions.get("image"),pa?Editor.formatImage:null)],pa?60:null);ma=d("insert",!0,pa?ca:null);g([ma,f(mxResources.get("delete"),
+A.actions.get("delete").funct,null,mxResources.get("delete"),A.actions.get("delete"),pa?Editor.trashImage:null)],pa?60:null);411<=l&&(g([Q,Z],60),520<=l&&g([W,640<=l?f("",T.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",T,Editor.zoomInImage):null,640<=l?f("",ba.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ba,Editor.zoomOutImage):null],60));null!=qa&&(mxEvent.disableContextMenu(qa),mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(za){(mxEvent.isShiftDown(za)||
mxEvent.isAltDown(za)||mxEvent.isMetaDown(za)||mxEvent.isControlDown(za)||mxEvent.isPopupTrigger(za))&&A.appIconClicked(za)}),null,null));ma=A.menus.get("language");null!=ma&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=l&&"1"!=urlParams.embed?(null==la&&(ma=G.addMenu("",ma.funct),ma.setAttribute("title","language"),ma.className="geToolbarButton",ma.style.backgroundImage="url("+Editor.globeImage+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize=
"22px 22px",ma.style.position="absolute",ma.style.height="24px",ma.style.width="24px",ma.style.zIndex="1",ma.style.right="8px",ma.style.cursor="pointer",ma.style.top="12px",P.appendChild(ma),la=ma),A.buttonContainer.style.paddingRight="34px"):(A.buttonContainer.style.paddingRight="0px",null!=la&&(la.parentNode.removeChild(la),la=null))}R.apply(this,arguments);var x=document.createElement("div");x.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";x.style.bottom=
"1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(x);if(1E3<=l||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=l&&(b(this,!0),this.formatWindow.window.setVisible(!0));var A=this,H=A.editor.graph;A.toolbar=this.createToolbar(A.createDiv("geToolbar"));
A.defaultLibraryName=mxResources.get("untitledLibrary");var P=document.createElement("div");P.className="geMenubarContainer";var M=null,G=new Menubar(A,P);A.statusContainer=A.createStatusContainer();A.statusContainer.style.position="relative";A.statusContainer.style.maxWidth="";A.statusContainer.style.color="gray";A.statusContainer.style.cursor="default";var ia=A.hideCurrentMenu;A.hideCurrentMenu=function(){ia.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ja=A.descriptorChanged;
A.descriptorChanged=function(){ja.apply(this,arguments);var pa=A.getCurrentFile();if(null!=pa&&null!=pa.getTitle()){var ma=pa.getMode();"google"==ma?ma="googleDrive":"github"==ma?ma="gitHub":"gitlab"==ma?ma="gitLab":"onedrive"==ma&&(ma="oneDrive");ma=mxResources.get(ma);P.setAttribute("title",pa.getTitle()+(null!=ma?" ("+ma+")":""))}else P.removeAttribute("title")};A.setStatusText(A.editor.getStatus());P.appendChild(A.statusContainer);A.buttonContainer=document.createElement("div");A.buttonContainer.style.cssText=
"position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";P.appendChild(A.buttonContainer);A.menubarContainer=A.buttonContainer;A.tabContainer=document.createElement("div");A.tabContainer.className="geTabContainer";A.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";x=A.diagramContainer.parentNode;var ha=document.createElement("div");ha.style.cssText=
-"position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";A.diagramContainer.style.top="47px";var ba=Editor.addBoxImage;if(null!=A.hoverIcons){var oa=A.hoverIcons.update;A.hoverIcons.update=function(){H.freehand.isDrawing()||oa.apply(this,arguments)}}if(null!=H.freehand){var sa=H.freehand.createStyle;H.freehand.createStyle=function(pa){return sa.apply(this,arguments)+"sketch=0;"}}A.editor.addListener("statusChanged",mxUtils.bind(this,function(){A.setStatusText(A.editor.getStatus())}));
-A.setStatusText(A.editor.getStatus());var J=A.menus.get("viewZoom");if(null!=J){var V=function(pa){if(mxEvent.isAltDown(pa))A.hideCurrentMenu(),A.actions.get("customZoom").funct(),mxEvent.consume(pa);else if("geItem"!=mxEvent.getSource(pa).className||mxEvent.isShiftDown(pa))A.hideCurrentMenu(),A.actions.get("smartFit").funct(),mxEvent.consume(pa)},T=A.actions.get("zoomIn"),ca=A.actions.get("zoomOut"),Y=A.actions.get("resetView"),p=A.actions.get("undo"),E=A.actions.get("redo"),Q=f("",p.funct,null,
+"position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";A.diagramContainer.style.top="47px";var ca=Editor.addBoxImage;if(null!=A.hoverIcons){var oa=A.hoverIcons.update;A.hoverIcons.update=function(){H.freehand.isDrawing()||oa.apply(this,arguments)}}if(null!=H.freehand){var sa=H.freehand.createStyle;H.freehand.createStyle=function(pa){return sa.apply(this,arguments)+"sketch=0;"}}A.editor.addListener("statusChanged",mxUtils.bind(this,function(){A.setStatusText(A.editor.getStatus())}));
+A.setStatusText(A.editor.getStatus());var J=A.menus.get("viewZoom");if(null!=J){var V=function(pa){if(mxEvent.isAltDown(pa))A.hideCurrentMenu(),A.actions.get("customZoom").funct(),mxEvent.consume(pa);else if("geItem"!=mxEvent.getSource(pa).className||mxEvent.isShiftDown(pa))A.hideCurrentMenu(),A.actions.get("smartFit").funct(),mxEvent.consume(pa)},T=A.actions.get("zoomIn"),ba=A.actions.get("zoomOut"),Y=A.actions.get("resetView"),p=A.actions.get("undo"),E=A.actions.get("redo"),Q=f("",p.funct,null,
mxResources.get("undo")+" ("+p.shortcut+")",p,Editor.undoImage),Z=f("",E.funct,null,mxResources.get("redo")+" ("+E.shortcut+")",E,Editor.redoImage),W=f("",V,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Y,Editor.zoomFitImage);P.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";var X=G.addMenu("100%",J.funct);X.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");X.style.whiteSpace=
"nowrap";X.style.paddingRight="10px";X.style.textDecoration="none";X.style.textDecoration="none";X.style.overflow="hidden";X.style.visibility="hidden";X.style.textAlign="center";X.style.cursor="pointer";X.style.height=parseInt(A.tabContainerHeight)-1+"px";X.style.lineHeight=parseInt(A.tabContainerHeight)+1+"px";X.style.position="absolute";X.style.display="block";X.style.fontSize="12px";X.style.width="59px";X.style.right="0px";X.style.bottom="0px";X.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+
")";X.style.backgroundPosition="right 6px center";X.style.backgroundRepeat="no-repeat";ha.appendChild(X);(function(pa){mxEvent.addListener(pa,"click",V);var ma=mxUtils.bind(this,function(){pa.innerText="";mxUtils.write(pa,Math.round(100*A.editor.graph.view.scale)+"%")});A.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ma);A.editor.addListener("resetGraphView",ma);A.editor.addListener("pageSelected",ma)})(X);var da=A.setGraphEnabled;A.setGraphEnabled=function(){da.apply(this,arguments);null!=this.tabContainer&&
@@ -4117,20 +4117,20 @@ N<D;N++)S=b.getChildAt(b.root,N),b.setVisible(S,q[S.id]||!1)}else for(N=0;N<D;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.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";
e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,l=null,B=mxUtils.bind(this,function(ha){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);k=null;l=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";
l=null}),100)}),ha||200)}),q=mxUtils.bind(this,function(ha){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,ha||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ha){mxEvent.isTouchEvent(ha)||(q(30),B())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ha){mxEvent.consume(ha)});mxEvent.addListener(e,"mouseenter",
-mxUtils.bind(this,function(ha){q(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ha){q(100);mxEvent.consume(ha)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(ha){mxEvent.isTouchEvent(ha)||q(30)}));var D=this.graph,N=D.getTolerance();D.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ha,ba){this.startX=ba.getGraphX();this.startY=ba.getGraphY();this.scrollLeft=D.container.scrollLeft;this.scrollTop=D.container.scrollTop},mouseMove:function(ha,
-ba){},mouseUp:function(ha,ba){mxEvent.isTouchEvent(ba.getEvent())&&Math.abs(this.scrollLeft-D.container.scrollLeft)<N&&Math.abs(this.scrollTop-D.container.scrollTop)<N&&Math.abs(this.startX-ba.getGraphX())<N&&Math.abs(this.startY-ba.getGraphY())<N&&(0<parseFloat(e.style.opacity||0)?B():q(30))}})}for(var S=this.toolbarItems,F=0,K=mxUtils.bind(this,function(ha,ba,oa,sa){ha=this.createToolbarButton(ha,ba,oa,sa);e.appendChild(ha);F++;return ha}),R=null,d=null,f=null,g=null,u=0;u<S.length;u++){var x=S[u];
+mxUtils.bind(this,function(ha){q(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ha){q(100);mxEvent.consume(ha)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(ha){mxEvent.isTouchEvent(ha)||q(30)}));var D=this.graph,N=D.getTolerance();D.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ha,ca){this.startX=ca.getGraphX();this.startY=ca.getGraphY();this.scrollLeft=D.container.scrollLeft;this.scrollTop=D.container.scrollTop},mouseMove:function(ha,
+ca){},mouseUp:function(ha,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-D.container.scrollLeft)<N&&Math.abs(this.scrollTop-D.container.scrollTop)<N&&Math.abs(this.startX-ca.getGraphX())<N&&Math.abs(this.startY-ca.getGraphY())<N&&(0<parseFloat(e.style.opacity||0)?B():q(30))}})}for(var S=this.toolbarItems,F=0,K=mxUtils.bind(this,function(ha,ca,oa,sa){ha=this.createToolbarButton(ha,ca,oa,sa);e.appendChild(ha);F++;return ha}),R=null,d=null,f=null,g=null,u=0;u<S.length;u++){var x=S[u];
if("pages"==x){g=b.ownerDocument.createElement("div");g.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(g,70);var A=K(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");A.style.borderRightStyle="none";A.style.paddingLeft="0px";A.style.paddingRight="0px";e.appendChild(g);var H=K(mxUtils.bind(this,
function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");H.style.paddingLeft="0px";H.style.paddingRight="0px";x=mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,this.currentPage+1+" / "+this.diagrams.length);g.style.display=1<this.diagrams.length?"inline-block":"none";A.style.display=g.style.display;H.style.display=g.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)this.zoomEnabled&&(K(mxUtils.bind(this,function(){this.graph.zoomOut()}),
Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),K(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),K(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==x){if(this.layersEnabled){var P=this.graph.getModel(),M=K(mxUtils.bind(this,function(ha){if(null!=
R)R.parentNode.removeChild(R),R=null;else{R=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var oa=this.graph.getGraphBounds(),sa=this.graph.view;0>oa.x||0>oa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:sa.translate.clone(),scale:sa.scale}):null!=this.graph.originalViewState&&0<oa.x/sa.scale+this.graph.originalViewState.translate.x-sa.translate.x&&0<oa.y/sa.scale+this.graph.originalViewState.translate.y-
sa.translate.y&&(sa.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:sa.translate.clone(),scale:sa.scale})}}));mxEvent.addListener(R,"mouseleave",function(){R.parentNode.removeChild(R);R=null});ha=M.getBoundingClientRect();R.style.width="140px";R.style.padding="2px 0px 2px 0px";R.style.border="1px solid #d0d0d0";R.style.backgroundColor="#eee";R.style.fontFamily=Editor.defaultHtmlFont;
-R.style.fontSize="11px";R.style.overflowY="auto";R.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";R.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(R,80);var ba=mxUtils.getDocumentScrollOrigin(document);R.style.left=ba.x+ha.left-1+"px";R.style.top=ba.y+ha.bottom-2+"px";document.body.appendChild(R)}}),Editor.layersImage,mxResources.get("layers")||"Layers");P.addListener(mxEvent.CHANGE,function(){M.style.display=1<P.getChildCount(P.root)?"inline-block":"none"});M.style.display=
+R.style.fontSize="11px";R.style.overflowY="auto";R.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";R.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(R,80);var ca=mxUtils.getDocumentScrollOrigin(document);R.style.left=ca.x+ha.left-1+"px";R.style.top=ca.y+ha.bottom-2+"px";document.body.appendChild(R)}}),Editor.layersImage,mxResources.get("layers")||"Layers");P.addListener(mxEvent.CHANGE,function(){M.style.display=1<P.getChildCount(P.root)?"inline-block":"none"});M.style.display=
1<P.getChildCount(P.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var G=K(mxUtils.bind(this,function(ha){null==d&&(d=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),d.div.getElementsByTagName("div")[0].style.position="",d.div.style.maxHeight="160px",d.div.style.maxWidth="120px",d.div.style.padding="2px",d.div.style.overflow="auto",d.div.style.height="auto",d.div.style.position="fixed",d.div.style.fontFamily=Editor.defaultHtmlFont,d.div.style.fontSize="11px",
-d.div.style.backgroundColor="#eee",d.div.style.color="#000",d.div.style.border="1px solid #d0d0d0",d.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(d.div,80));if(null!=f)f.parentNode.removeChild(f),f=null;else{f=d.div;mxEvent.addListener(f,"mouseleave",function(){null!=f&&(f.parentNode.removeChild(f),f=null)});ha=G.getBoundingClientRect();var ba=mxUtils.getDocumentScrollOrigin(document);f.style.left=ba.x+ha.left-1+"px";f.style.top=ba.y+ha.bottom-2+"px";document.body.appendChild(f);d.refresh()}}),
+d.div.style.backgroundColor="#eee",d.div.style.color="#000",d.div.style.border="1px solid #d0d0d0",d.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(d.div,80));if(null!=f)f.parentNode.removeChild(f),f=null;else{f=d.div;mxEvent.addListener(f,"mouseleave",function(){null!=f&&(f.parentNode.removeChild(f),f=null)});ha=G.getBoundingClientRect();var ca=mxUtils.getDocumentScrollOrigin(document);f.style.left=ca.x+ha.left-1+"px";f.style.top=ca.y+ha.bottom-2+"px";document.body.appendChild(f);d.refresh()}}),
Editor.tagsImage,mxResources.get("tags")||"Tags");P.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){G.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));G.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==x?this.lightboxEnabled&&K(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(x=this.graphConfig["toolbar-buttons"][x],null!=
x&&(x.elem=K(null==x.enabled||x.enabled?x.handler:function(){},x.image,x.title,x.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*F);null!=this.graphConfig.title&&(S=b.ownerDocument.createElement("div"),S.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",S.setAttribute("title",this.graphConfig.title),mxUtils.write(S,this.graphConfig.title),mxUtils.setOpacity(S,
-70),e.appendChild(S),this.filename=S);this.minToolbarWidth=34*F;var ia=b.style.border,ja=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 ha=b.getBoundingClientRect(),ba=mxUtils.getScrollOrigin(document.body);ba="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ba.x,top:-ba.y};ha={left:ha.left-
-ba.left,top:ha.top-ba.top,bottom:ha.bottom-ba.top,right:ha.right-ba.left};e.style.left=ha.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ha.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ha.top+1+"px"):e.style.top=ha.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var oa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=
+70),e.appendChild(S),this.filename=S);this.minToolbarWidth=34*F;var ia=b.style.border,ja=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 ha=b.getBoundingClientRect(),ca=mxUtils.getScrollOrigin(document.body);ca="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ca.x,top:-ca.y};ha={left:ha.left-
+ca.left,top:ha.top-ca.top,bottom:ha.bottom-ca.top,right:ha.right-ca.left};e.style.left=ha.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ha.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ha.top+1+"px"):e.style.top=ha.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var oa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=
R&&(R.parentNode.removeChild(R),R=null);b.style.border=ia});mxEvent.addListener(document,"mousemove",function(sa){for(sa=mxEvent.getSource(sa);null!=sa;){if(sa==b||sa==e||sa==R)return;sa=sa.parentNode}oa()});mxEvent.addListener(document.body,"mouseleave",function(sa){oa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ja):ja();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
e.parentNode&&ja()})).observe(b)};
GraphViewer.prototype.createToolbarButton=function(b,e,k,l){var B=document.createElement("div");B.style.borderRight="1px solid #d0d0d0";B.style.padding="3px 6px 3px 6px";mxEvent.addListener(B,"click",b);null!=k&&B.setAttribute("title",k);B.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";null==l||l?(mxEvent.addListener(B,"mouseenter",function(){B.style.backgroundColor="#ddd"}),mxEvent.addListener(B,"mouseleave",
@@ -4156,6 +4156,6 @@ GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewe
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,l){function B(){this.q=[];this.add=function(f){this.q.push(f)};var R,d;this.call=function(){R=0;for(d=this.q.length;R<d;R++)this.q[R].call()}}function q(R,d){return R.currentStyle?R.currentStyle[d]:window.getComputedStyle?window.getComputedStyle(R,null).getPropertyValue(d):R.style[d]}function D(R,d){if(!R.resizedAttached)R.resizedAttached=
new B,R.resizedAttached.add(d);else if(R.resizedAttached){R.resizedAttached.add(d);return}R.resizeSensor=document.createElement("div");R.resizeSensor.className="resize-sensor";R.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";R.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>';
R.appendChild(R.resizeSensor);"static"==q(R,"position")&&(R.style.position="relative");var f=R.resizeSensor.childNodes[0],g=f.childNodes[0],u=R.resizeSensor.childNodes[1],x=function(){g.style.width="100000px";g.style.height="100000px";f.scrollLeft=1E5;f.scrollTop=1E5;u.scrollLeft=1E5;u.scrollTop=1E5};x();var A=!1,H=function(){R.resizedAttached&&(A&&(R.resizedAttached.call(),A=!1),b(H))};b(H);var P,M,G,ia;d=function(){if((G=R.offsetWidth)!=P||(ia=R.offsetHeight)!=M)A=!0,P=G,M=ia;x()};var ja=function(ha,
-ba,oa){ha.attachEvent?ha.attachEvent("on"+ba,oa):ha.addEventListener(ba,oa)};ja(f,"scroll",d);ja(u,"scroll",d)}var N=function(){GraphViewer.resizeSensorEnabled&&l()},S=Object.prototype.toString.call(k),F="[object Array]"===S||"[object NodeList]"===S||"[object HTMLCollection]"===S||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(F){S=0;for(var K=k.length;S<K;S++)D(k[S],N)}else D(k,N);this.detach=function(){if(F)for(var R=0,d=k.length;R<d;R++)e.detach(k[R]);
+ca,oa){ha.attachEvent?ha.attachEvent("on"+ca,oa):ha.addEventListener(ca,oa)};ja(f,"scroll",d);ja(u,"scroll",d)}var N=function(){GraphViewer.resizeSensorEnabled&&l()},S=Object.prototype.toString.call(k),F="[object Array]"===S||"[object NodeList]"===S||"[object HTMLCollection]"===S||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(F){S=0;for(var K=k.length;S<K;S++)D(k[S],N)}else D(k,N);this.detach=function(){if(F)for(var R=0,d=k.length;R<d;R++)e.detach(k[R]);
else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();