完成drawio升级

This commit is contained in:
kuaifan 2023-02-13 10:01:48 +08:00
parent 472ece692d
commit 8b4244d237
3 changed files with 54 additions and 70 deletions

View File

@ -1,24 +1,3 @@
# Change # Change
## js/diagramly/ElectronApp.js diff https://github.com/jgraph/drawio/tree/1a858166fb4f1330cf23e58941e3fbec1dcd16f8
- 隐藏文件中的无用菜单
## js/app.min.js
- 隐藏帮助菜单
- 取消未保存关闭窗口提示
- `EmbedFile.prototype.getTitle=...``EmbedFile.prototype.getTitle=function(){return this.desc.title||(urlParams.title?decodeURIComponent(urlParams.title):"")}`
- `c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(b,["insertTemplate"],d)``c.insertTemplateEnabled&&this.addMenuItems(b,["insertTemplate"],d)`
- `390:270``390:285`
- `!this.editorUi.isOffline()&&d.length<=c/4?(f=b-Math.ceil((e-c/4)/c),mxUtils.get(ICONSEARCH_PATH``d.length<=c/4?(f=b-Math.ceil((e-c/4)/c),mxUtils.get(ICONSEARCH_PATH`
## index.html
- 隐藏加载中的提示
- 加入
```js
window.EXPORT_URL = window.location.origin + "/drawio/export/";
window.DRAWIO_LIGHTBOX_URL = window.location.origin + "/drawio/webapp";
setInterval(function() {window.ICONSEARCH_PATH = window.location.origin + "/drawio/iconsearch";}, 1000)
```

View File

@ -9,7 +9,7 @@
<meta name="Keywords" content="drawio, diagram, online, flow chart, flowchart maker, uml, erd"> <meta name="Keywords" content="drawio, diagram, online, flow chart, flowchart maker, uml, erd">
<meta itemprop="name" content="draw.io - free flowchart maker and diagrams online"> <meta itemprop="name" content="draw.io - free flowchart maker and diagrams online">
<meta itemprop="description" content="draw.io is a free online diagramming application and flowchart maker . You can use it to create UML, entity relationship, <meta itemprop="description" content="draw.io is a free online diagramming application and flowchart maker . You can use it to create UML, entity relationship,
org charts, BPMN and BPM, database schema and networks. Also possible are telecommunication network, workflow, flowcharts, maps overlays and GIS, electronic org charts, BPMN and BPM, database schema and networks. Also possible are telecommunication network, workflow, flowcharts, maps overlays and GIS, electronic
circuit and social network diagrams."> circuit and social network diagrams.">
<meta itemprop="image" content="https://lh4.googleusercontent.com/-cLKEldMbT_E/Tx8qXDuw6eI/AAAAAAAAAAs/Ke0pnlk8Gpg/w500-h344-k/BPMN%2Bdiagram%2Brc2f.png"> <meta itemprop="image" content="https://lh4.googleusercontent.com/-cLKEldMbT_E/Tx8qXDuw6eI/AAAAAAAAAAs/Ke0pnlk8Gpg/w500-h344-k/BPMN%2Bdiagram%2Brc2f.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
@ -17,6 +17,10 @@
<meta name="mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#d89000"> <meta name="theme-color" content="#d89000">
<script type="text/javascript"> <script type="text/javascript">
window.EXPORT_URL = window.location.origin + "/drawio/export/";
window.DRAWIO_LIGHTBOX_URL = window.location.origin + "/drawio/webapp";
setInterval(function() {window.ICONSEARCH_PATH = window.location.origin + "/drawio/iconsearch";}, 1000)
/** /**
* URL Parameters and protocol description are here: * URL Parameters and protocol description are here:
* *
@ -40,27 +44,27 @@
{ {
var result = new Object(); var result = new Object();
var params = window.location.search.slice(1).split('&'); var params = window.location.search.slice(1).split('&');
for (var i = 0; i < params.length; i++) for (var i = 0; i < params.length; i++)
{ {
var idx = params[i].indexOf('='); var idx = params[i].indexOf('=');
if (idx > 0) if (idx > 0)
{ {
result[params[i].substring(0, idx)] = params[i].substring(idx + 1); result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
} }
} }
return result; return result;
})(); })();
// Forces CDN caches by passing URL parameters via URL hash // Forces CDN caches by passing URL parameters via URL hash
if (window.location.hash != null && window.location.hash.substring(0, 2) == '#P') if (window.location.hash != null && window.location.hash.substring(0, 2) == '#P')
{ {
try try
{ {
urlParams = JSON.parse(decodeURIComponent(window.location.hash.substring(2))); urlParams = JSON.parse(decodeURIComponent(window.location.hash.substring(2)));
if (urlParams.hash != null) if (urlParams.hash != null)
{ {
window.location.hash = urlParams.hash; window.location.hash = urlParams.hash;
@ -71,7 +75,7 @@
// ignore // ignore
} }
} }
// Global variable for desktop // Global variable for desktop
var mxIsElectron = window && window.process && window.process.type; var mxIsElectron = window && window.process && window.process.type;
@ -81,21 +85,21 @@
(function() (function()
{ {
var proto = window.location.protocol; var proto = window.location.protocol;
if (!mxIsElectron) if (!mxIsElectron)
{ {
var host = window.location.host; var host = window.location.host;
// Redirects apex, drive and rt to www // Redirects apex, drive and rt to www
if (host === 'draw.io' || host === 'rt.draw.io' || host === 'drive.draw.io') if (host === 'draw.io' || host === 'rt.draw.io' || host === 'drive.draw.io')
{ {
host = 'www.draw.io'; host = 'www.draw.io';
} }
var href = proto + '//' + host + window.location.href.substring( var href = proto + '//' + host + window.location.href.substring(
window.location.protocol.length + window.location.protocol.length +
window.location.host.length + 2); window.location.host.length + 2);
// Redirects if href changes // Redirects if href changes
if (href != window.location.href) if (href != window.location.href)
{ {
@ -104,7 +108,7 @@
} }
})(); })();
} }
/** /**
* Adds meta tag to the page. * Adds meta tag to the page.
*/ */
@ -113,15 +117,15 @@
try try
{ {
var s = document.createElement('meta'); var s = document.createElement('meta');
if (name != null) if (name != null)
{ {
s.setAttribute('name', name); s.setAttribute('name', name);
} }
s.setAttribute('content', content); s.setAttribute('content', content);
if (httpEquiv != null) if (httpEquiv != null)
{ {
s.setAttribute('http-equiv', httpEquiv); s.setAttribute('http-equiv', httpEquiv);
} }
@ -134,14 +138,14 @@
// ignore // ignore
} }
}; };
/** /**
* Synchronously adds scripts to the page. * Synchronously adds scripts to the page.
*/ */
function mxscript(src, onLoad, id, dataAppKey, noWrite, onError) function mxscript(src, onLoad, id, dataAppKey, noWrite, onError)
{ {
var defer = onLoad == null && !noWrite; var defer = onLoad == null && !noWrite;
if ((urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function") || if ((urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function") ||
onLoad != null || noWrite) onLoad != null || noWrite)
{ {
@ -154,16 +158,16 @@
{ {
s.setAttribute('id', id); s.setAttribute('id', id);
} }
if (dataAppKey != null) if (dataAppKey != null)
{ {
s.setAttribute('data-app-key', dataAppKey); s.setAttribute('data-app-key', dataAppKey);
} }
if (onLoad != null) if (onLoad != null)
{ {
var r = false; var r = false;
s.onload = s.onreadystatechange = function() s.onload = s.onreadystatechange = function()
{ {
if (!r && (!this.readyState || this.readyState == 'complete')) if (!r && (!this.readyState || this.readyState == 'complete'))
@ -181,9 +185,9 @@
onError('Failed to load ' + src, e); onError('Failed to load ' + src, e);
}; };
} }
var t = document.getElementsByTagName('script')[0]; var t = document.getElementsByTagName('script')[0];
if (t != null) if (t != null)
{ {
t.parentNode.insertBefore(s, t); t.parentNode.insertBefore(s, t);
@ -205,11 +209,11 @@
g.type = 'text/javascript'; g.type = 'text/javascript';
g.async = true; g.async = true;
g.src = src; g.src = src;
var s = document.getElementsByTagName('script')[0]; var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(g, s); s.parentNode.insertBefore(g, s);
}; };
/** /**
* Adds meta tags with application name (depends on offline URL parameter) * Adds meta tags with application name (depends on offline URL parameter)
*/ */
@ -224,10 +228,10 @@
mxmeta(null, 'default-src \'self\' \'unsafe-inline\'; connect-src \'self\' https://*.draw.io https://fonts.googleapis.com https://fonts.gstatic.com; img-src * data:; media-src *; font-src *; style-src-elem \'self\' \'unsafe-inline\' https://fonts.googleapis.com', 'Content-Security-Policy'); mxmeta(null, 'default-src \'self\' \'unsafe-inline\'; connect-src \'self\' https://*.draw.io https://fonts.googleapis.com https://fonts.gstatic.com; img-src * data:; media-src *; font-src *; style-src-elem \'self\' \'unsafe-inline\' https://fonts.googleapis.com', 'Content-Security-Policy');
} }
})(); })();
// Checks for local storage // Checks for local storage
var isLocalStorage = false; var isLocalStorage = false;
try try
{ {
isLocalStorage = urlParams['local'] != '1' && typeof(localStorage) != 'undefined'; isLocalStorage = urlParams['local'] != '1' && typeof(localStorage) != 'undefined';
@ -238,15 +242,15 @@
} }
var mxScriptsLoaded = false, mxWinLoaded = false; var mxScriptsLoaded = false, mxWinLoaded = false;
function checkAllLoaded() function checkAllLoaded()
{ {
if (mxScriptsLoaded && mxWinLoaded) if (mxScriptsLoaded && mxWinLoaded)
{ {
App.main(); App.main();
} }
}; };
var t0 = new Date(); var t0 = new Date();
// Changes paths for local development environment // Changes paths for local development environment
@ -254,18 +258,18 @@
{ {
// Used to request grapheditor/mxgraph sources in dev mode // Used to request grapheditor/mxgraph sources in dev mode
var mxDevUrl = document.location.protocol + '//devhost.jgraph.com/drawio/src/main'; var mxDevUrl = document.location.protocol + '//devhost.jgraph.com/drawio/src/main';
// Used to request draw.io sources in dev mode // Used to request draw.io sources in dev mode
var drawDevUrl = document.location.protocol + '//devhost.jgraph.com/drawio/src/main/webapp/'; var drawDevUrl = document.location.protocol + '//devhost.jgraph.com/drawio/src/main/webapp/';
var geBasePath = drawDevUrl + '/js/grapheditor'; var geBasePath = drawDevUrl + '/js/grapheditor';
var mxBasePath = mxDevUrl + '/mxgraph'; var mxBasePath = mxDevUrl + '/mxgraph';
if (document.location.protocol == 'file:') if (document.location.protocol == 'file:')
{ {
geBasePath = './js/grapheditor'; geBasePath = './js/grapheditor';
mxBasePath = './mxgraph'; mxBasePath = './mxgraph';
drawDevUrl = './'; drawDevUrl = './';
// Forces includes for dev environment in node.js // Forces includes for dev environment in node.js
mxForceIncludes = true; mxForceIncludes = true;
} }
@ -276,19 +280,19 @@
mxscript(drawDevUrl + 'js/diagramly/Init.js'); mxscript(drawDevUrl + 'js/diagramly/Init.js');
mxscript(geBasePath + '/Init.js'); mxscript(geBasePath + '/Init.js');
mxscript(mxBasePath + '/mxClient.js'); mxscript(mxBasePath + '/mxClient.js');
// Adds all JS code that depends on mxClient. This indirection via Devel.js is // Adds all JS code that depends on mxClient. This indirection via Devel.js is
// required in some browsers to make sure mxClient.js (and the files that it // required in some browsers to make sure mxClient.js (and the files that it
// loads asynchronously) are available when the code loaded in Devel.js runs. // loads asynchronously) are available when the code loaded in Devel.js runs.
mxscript(drawDevUrl + 'js/diagramly/Devel.js'); mxscript(drawDevUrl + 'js/diagramly/Devel.js');
// Electron // Electron
if (mxIsElectron) if (mxIsElectron)
{ {
mxscript('js/diagramly/DesktopLibrary.js'); mxscript('js/diagramly/DesktopLibrary.js');
mxscript('js/diagramly/ElectronApp.js'); mxscript('js/diagramly/ElectronApp.js');
} }
mxscript(drawDevUrl + 'js/PostConfig.js'); mxscript(drawDevUrl + 'js/PostConfig.js');
} }
else else
@ -296,18 +300,18 @@
(function() (function()
{ {
var hostName = window.location.hostname; var hostName = window.location.hostname;
// Supported domains are *.draw.io and the packaged version in Quip // Supported domains are *.draw.io and the packaged version in Quip
var supportedDomain = (hostName.substring(hostName.length - 8, hostName.length) === '.draw.io') || var supportedDomain = (hostName.substring(hostName.length - 8, hostName.length) === '.draw.io') ||
(hostName.substring(hostName.length - 13, hostName.length) === '.diagrams.net'); (hostName.substring(hostName.length - 13, hostName.length) === '.diagrams.net');
function loadAppJS() function loadAppJS()
{ {
mxscript('js/app.min.js', function() mxscript('js/app.min.js', function()
{ {
mxScriptsLoaded = true; mxScriptsLoaded = true;
checkAllLoaded(); checkAllLoaded();
// Electron // Electron
if (mxIsElectron) if (mxIsElectron)
{ {
@ -334,7 +338,7 @@
} }
}); });
}; };
if (!supportedDomain || mxIsElectron) if (!supportedDomain || mxIsElectron)
{ {
mxscript('js/PreConfig.js', loadAppJS); mxscript('js/PreConfig.js', loadAppJS);
@ -350,7 +354,7 @@
window.onerror = function() window.onerror = function()
{ {
var status = document.getElementById('geStatus'); var status = document.getElementById('geStatus');
if (status != null) if (status != null)
{ {
status.innerHTML = 'Page could not be loaded. Please try refreshing.'; status.innerHTML = 'Page could not be loaded. Please try refreshing.';
@ -374,6 +378,7 @@
color:#606060; color:#606060;
} }
.geBlock { .geBlock {
display: none;
z-index:-3; z-index:-3;
margin:100px; margin:100px;
margin-top:40px; margin-top:40px;
@ -438,7 +443,7 @@
<div class="geBlock"> <div class="geBlock">
<h1>Flowchart Maker and Online Diagram Software</h1> <h1>Flowchart Maker and Online Diagram Software</h1>
<p> <p>
draw.io is free online diagram software. You can use it as a flowchart maker, network diagram software, to create UML online, as an ER diagram tool, draw.io is free online diagram software. You can use it as a flowchart maker, network diagram software, to create UML online, as an ER diagram tool,
to design database schema, to build BPMN online, as a circuit diagram maker, and more. draw.io can import .vsdx, Gliffy&trade; and Lucidchart&trade; files . to design database schema, to build BPMN online, as a circuit diagram maker, and more. draw.io can import .vsdx, Gliffy&trade; and Lucidchart&trade; files .
</p> </p>
<h2 id="geStatus">Loading...</h2> <h2 id="geStatus">Loading...</h2>

View File

@ -2235,7 +2235,7 @@ null!=G.deltaY&&40>Math.abs(G.deltaY)&&Math.round(G.deltaY)!=G.deltaY?ha=1+Math.
EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)}; EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};
EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth}; EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,f=60;null!=b&&(f=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(f,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))}; EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,f=60;null!=b&&(f=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(f,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")}; EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange(); EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,f,e){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(a);g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(b,f,null,e);this.setCurrentMenu(g)}; this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,f,e){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(a);g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(b,f,null,e);this.setCurrentMenu(g)};
EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a;this.hideShapePicker()};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a}; EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a;this.hideShapePicker()};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};
@ -3583,7 +3583,7 @@ n=this.addAction("format",mxUtils.bind(this,function(){e.toggleFormatPanel()}),n
this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m= this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m=
d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=new ConnectionPointsDialog(e,m);e.showDialog(r.container,350,450,!0,!1,function(){r.destroy()});r.init()}},null,null,"Alt+Shift+Q").isEnabled=h};Actions.prototype.addAction=function(a,b,f,e,g){if("..."==a.substring(a.length-3)){a=a.substring(0,a.length-3);var d=mxResources.get(a)+"..."}else d=mxResources.get(a);return this.put(a,new Action(d,b,f,e,g))}; d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=new ConnectionPointsDialog(e,m);e.showDialog(r.container,350,450,!0,!1,function(){r.destroy()});r.init()}},null,null,"Alt+Shift+Q").isEnabled=h};Actions.prototype.addAction=function(a,b,f,e,g){if("..."==a.substring(a.length-3)){a=a.substring(0,a.length-3);var d=mxResources.get(a)+"..."}else d=mxResources.get(a);return this.put(a,new Action(d,b,f,e,g))};
Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};function Action(a,b,f,e,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=e;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))}; Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};function Action(a,b,f,e,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=e;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};
Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};Menus=function(a){this.editorUi=a;this.menus={};this.init();mxClient.IS_SVG||((new Image).src=this.checkmarkImage)};Menus.prototype.defaultFont="Helvetica";Menus.prototype.defaultFontSize="12";Menus.prototype.defaultMenuItems="file edit view arrange extras help".split(" ");Menus.prototype.defaultFonts="Helvetica;Verdana;Times New Roman;Garamond;Comic Sans MS;Courier New;Georgia;Lucida Console;Tahoma".split(";");Menus.prototype.autoPopup=!0; Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};Menus=function(a){this.editorUi=a;this.menus={};this.init();mxClient.IS_SVG||((new Image).src=this.checkmarkImage)};Menus.prototype.defaultFont="Helvetica";Menus.prototype.defaultFontSize="12";Menus.prototype.defaultMenuItems="file edit view arrange extras".split(" ");Menus.prototype.defaultFonts="Helvetica;Verdana;Times New Roman;Garamond;Comic Sans MS;Courier New;Georgia;Lucida Console;Tahoma".split(";");Menus.prototype.autoPopup=!0;
Menus.prototype.init=function(){var a=this.editorUi,b=a.editor.graph,f=mxUtils.bind(b,b.isEnabled);this.customFonts=[];this.customFontSizes=[];this.put("fontFamily",new Menu(mxUtils.bind(this,function(e,g){for(var d=mxUtils.bind(this,function(n){this.styleChange(e,n,[mxConstants.STYLE_FONTFAMILY],[n],null,g,function(){document.execCommand("fontname",!1,n);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY],"values",[n],"cells",[b.cellEditor.getEditingCell()]))},function(){b.updateLabelElements(b.getSelectionCells(), Menus.prototype.init=function(){var a=this.editorUi,b=a.editor.graph,f=mxUtils.bind(b,b.isEnabled);this.customFonts=[];this.customFontSizes=[];this.put("fontFamily",new Menu(mxUtils.bind(this,function(e,g){for(var d=mxUtils.bind(this,function(n){this.styleChange(e,n,[mxConstants.STYLE_FONTFAMILY],[n],null,g,function(){document.execCommand("fontname",!1,n);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY],"values",[n],"cells",[b.cellEditor.getEditingCell()]))},function(){b.updateLabelElements(b.getSelectionCells(),
function(u){u.removeAttribute("face");u.style.fontFamily=null;"PRE"==u.nodeName&&b.replaceElement(u,"div")})}).firstChild.nextSibling.style.fontFamily=n}),h=0;h<this.defaultFonts.length;h++)d(this.defaultFonts[h]);e.addSeparator(g);if(0<this.customFonts.length){for(h=0;h<this.customFonts.length;h++)d(this.customFonts[h]);e.addSeparator(g);e.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),g);e.addSeparator(g)}this.promptChange(e, function(u){u.removeAttribute("face");u.style.fontFamily=null;"PRE"==u.nodeName&&b.replaceElement(u,"div")})}).firstChild.nextSibling.style.fontFamily=n}),h=0;h<this.defaultFonts.length;h++)d(this.defaultFonts[h]);e.addSeparator(g);if(0<this.customFonts.length){for(h=0;h<this.customFonts.length;h++)d(this.customFonts[h]);e.addSeparator(g);e.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),g);e.addSeparator(g)}this.promptChange(e,
mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,g,!0,mxUtils.bind(this,function(n){0>mxUtils.indexOf(this.customFonts,n)&&(this.customFonts.push(n),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(e,g){function d(h,n){return e.addItem(h,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+ mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,g,!0,mxUtils.bind(this,function(n){0>mxUtils.indexOf(this.customFonts,n)&&(this.customFonts.push(n),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(e,g){function d(h,n){return e.addItem(h,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+
@ -3847,7 +3847,7 @@ this.addCumulusPalette();this.addCitrixPalette();this.addGCP2Palette();this.addG
this.addFluidPowerPalette();this.addGMDLPalette();this.addPidPalette(p,l);this.addThreatModelingPalette();this.addWebIconsPalette();this.addWebLogosPalette();this.addSignsPalette(m,l);this.showEntries();null!=this.createdSearchIndex&&console.log("searchFileData",Graph.compress(JSON.stringify(this.createdSearchIndex)))};if("1"==urlParams.createindex){var e=Sidebar.prototype.addStencilPalette;Sidebar.prototype.addStencilPalette=function(k,l,m,n,p,r,t,v,u,w){e.apply(this,arguments);t=null!=t?t:1;mxStencilRegistry.loadStencilSet(m, this.addFluidPowerPalette();this.addGMDLPalette();this.addPidPalette(p,l);this.addThreatModelingPalette();this.addWebIconsPalette();this.addWebLogosPalette();this.addSignsPalette(m,l);this.showEntries();null!=this.createdSearchIndex&&console.log("searchFileData",Graph.compress(JSON.stringify(this.createdSearchIndex)))};if("1"==urlParams.createindex){var e=Sidebar.prototype.addStencilPalette;Sidebar.prototype.addStencilPalette=function(k,l,m,n,p,r,t,v,u,w){e.apply(this,arguments);t=null!=t?t:1;mxStencilRegistry.loadStencilSet(m,
mxUtils.bind(this,function(q,x,y,z,A){if(null!=this.createdSearchIndex&&null==p||0>mxUtils.indexOf(p,x))q={style:"shape="+q+x+n,w:Math.round(z*t),h:Math.round(A*t)},x=null!=v?v[x]:null,null!=x&&(q.tags=x),null!=w&&(q.id=w,q.lib=k),this.createdSearchIndex.push(q)}),!0)}}Sidebar.prototype.extractIconsFromResponse=function(k,l){for(var m=0;m<k.icons.length;m++){for(var n=k.icons[m].raster_sizes,p=n.length-1;0<p&&128<n[p].size;)p--;var r=n[p].size;n=n[p].formats[0].preview_url;null!=r&&null!=n&&mxUtils.bind(this, mxUtils.bind(this,function(q,x,y,z,A){if(null!=this.createdSearchIndex&&null==p||0>mxUtils.indexOf(p,x))q={style:"shape="+q+x+n,w:Math.round(z*t),h:Math.round(A*t)},x=null!=v?v[x]:null,null!=x&&(q.tags=x),null!=w&&(q.id=w,q.lib=k),this.createdSearchIndex.push(q)}),!0)}}Sidebar.prototype.extractIconsFromResponse=function(k,l){for(var m=0;m<k.icons.length;m++){for(var n=k.icons[m].raster_sizes,p=n.length-1;0<p&&128<n[p].size;)p--;var r=n[p].size;n=n[p].formats[0].preview_url;null!=r&&null!=n&&mxUtils.bind(this,
function(t,v){l.push(mxUtils.bind(this,function(){return this.createVertexTemplate("shape=image;html=1;verticalAlign=top;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;aspect=fixed;image="+v,t,t,"")}))})(r,n)}};var f=Sidebar.prototype.searchEntries;Sidebar.prototype.searchEntries=function(k,l,m,n,p){var r=n;null!=this.searchIndexData&&(this.addSearchIndex(JSON.parse(Graph.decompress(this.searchIndexData))),this.searchIndexData=null);null!=ICONSEARCH_PATH&&(n=mxUtils.bind(this, function(t,v){l.push(mxUtils.bind(this,function(){return this.createVertexTemplate("shape=image;html=1;verticalAlign=top;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;aspect=fixed;image="+v,t,t,"")}))})(r,n)}};var f=Sidebar.prototype.searchEntries;Sidebar.prototype.searchEntries=function(k,l,m,n,p){var r=n;null!=this.searchIndexData&&(this.addSearchIndex(JSON.parse(Graph.decompress(this.searchIndexData))),this.searchIndexData=null);null!=ICONSEARCH_PATH&&(n=mxUtils.bind(this,
function(t,v,u,w){!this.editorUi.isOffline()&&t.length<=l/4?(u=m-Math.ceil((v-l/4)/l),mxUtils.get(ICONSEARCH_PATH+"?q="+encodeURIComponent(k)+"&p="+u+"&c="+l,mxUtils.bind(this,function(q){try{if(200<=q.getStatus()&&299>=q.getStatus()&&null!=q.getText()&&0<q.getText().length)try{var x=JSON.parse(q.getText());null==x||null==x.icons?(r(t,v,!1,w),this.editorUi.handleError(x)):(this.extractIconsFromResponse(x,t),r(t,(m-1)*l+t.length,x.icons.length==l,w))}catch(y){r(t,v,!1,w),this.editorUi.handleError(y)}else r(t, function(t,v,u,w){t.length<=l/4?(u=m-Math.ceil((v-l/4)/l),mxUtils.get(ICONSEARCH_PATH+"?q="+encodeURIComponent(k)+"&p="+u+"&c="+l,mxUtils.bind(this,function(q){try{if(200<=q.getStatus()&&299>=q.getStatus()&&null!=q.getText()&&0<q.getText().length)try{var x=JSON.parse(q.getText());null==x||null==x.icons?(r(t,v,!1,w),this.editorUi.handleError(x)):(this.extractIconsFromResponse(x,t),r(t,(m-1)*l+t.length,x.icons.length==l,w))}catch(y){r(t,v,!1,w),this.editorUi.handleError(y)}else r(t,
v,!1,w)}catch(y){r(t,v,!1,w),this.editorUi.handleError(y)}},function(){r(t,v,!1,w)}))):r(t,v,u||!this.editorUi.isOffline(),w)}));f.apply(this,arguments)};var g=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(k,l){if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){if(mxUtils.isAncestorNode(this.editorUi.sketchPickerMenuElt,k)){var m=mxUtils.getOffset(k);"simple"==Editor.currentTheme?(m.x+=(k.offsetWidth-l.width)/2-14,m.y=k.parentNode.offsetHeight- v,!1,w)}catch(y){r(t,v,!1,w),this.editorUi.handleError(y)}},function(){r(t,v,!1,w)}))):r(t,v,u||!this.editorUi.isOffline(),w)}));f.apply(this,arguments)};var g=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(k,l){if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){if(mxUtils.isAncestorNode(this.editorUi.sketchPickerMenuElt,k)){var m=mxUtils.getOffset(k);"simple"==Editor.currentTheme?(m.x+=(k.offsetWidth-l.width)/2-14,m.y=k.parentNode.offsetHeight-
2):(m.x=k.parentNode.offsetLeft+k.parentNode.offsetWidth+2,m.y+=(k.offsetHeight-l.height)/2);return new mxPoint(Math.max(0,m.x),Math.max(0,m.y))}if(null!=this.editorUi.sidebarWindow)return m=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div),m.x+=this.editorUi.sidebarWindow.window.div.offsetWidth+2,m.y+=k.offsetTop+(k.offsetHeight-l.height)/2,null!=k.offsetParent&&(m.y-=k.offsetParent.scrollTop),new mxPoint(Math.max(0,m.x),Math.max(0,m.y))}return g.apply(this,arguments)};var h=Sidebar.prototype.itemClicked; 2):(m.x=k.parentNode.offsetLeft+k.parentNode.offsetWidth+2,m.y+=(k.offsetHeight-l.height)/2);return new mxPoint(Math.max(0,m.x),Math.max(0,m.y))}if(null!=this.editorUi.sidebarWindow)return m=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div),m.x+=this.editorUi.sidebarWindow.window.div.offsetWidth+2,m.y+=k.offsetTop+(k.offsetHeight-l.height)/2,null!=k.offsetParent&&(m.y-=k.offsetParent.scrollTop),new mxPoint(Math.max(0,m.x),Math.max(0,m.y))}return g.apply(this,arguments)};var h=Sidebar.prototype.itemClicked;
Sidebar.prototype.itemClicked=function(k,l,m){var n=this.editorUi.editor.graph,p=!1;if(null!=k&&1==n.getSelectionCount()&&n.getModel().isVertex(k[0])){var r=n.cloneCell(k[0]);if(n.getModel().isEdge(n.getSelectionCell())&&null==n.getModel().getTerminal(n.getSelectionCell(),!1)&&n.getModel().isVertex(r)){n.getModel().beginUpdate();try{var t=n.view.getState(n.getSelectionCell());if(null!=t){var v=n.view.translate,u=n.view.scale,w=t.absolutePoints[t.absolutePoints.length-1];r.geometry.x=w.x/u-v.x-r.geometry.width/ Sidebar.prototype.itemClicked=function(k,l,m){var n=this.editorUi.editor.graph,p=!1;if(null!=k&&1==n.getSelectionCount()&&n.getModel().isVertex(k[0])){var r=n.cloneCell(k[0]);if(n.getModel().isEdge(n.getSelectionCell())&&null==n.getModel().getTerminal(n.getSelectionCell(),!1)&&n.getModel().isVertex(r)){n.getModel().beginUpdate();try{var t=n.view.getState(n.getSelectionCell());if(null!=t){var v=n.view.translate,u=n.view.scale,w=t.absolutePoints[t.absolutePoints.length-1];r.geometry.x=w.x/u-v.x-r.geometry.width/
@ -10903,7 +10903,7 @@ StorageFile.listLocalStorageFiles=function(b){for(var f=[],g=0;g<localStorage.le
StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var g=b.transaction(["files","filesInfo"],"readwrite");b=g.objectStore("files");g=g.objectStore("filesInfo");for(var c=0;c<f.length;c++){var m=f[c],n=localStorage.getItem(m.title);b.add({title:m.title,data:n});g.add(m)}}; StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var g=b.transaction(["files","filesInfo"],"readwrite");b=g.objectStore("files");g=g.objectStore("filesInfo");for(var c=0;c<f.length;c++){var m=f[c],n=localStorage.getItem(m.title);b.add({title:m.title,data:n});g.add(m)}};
StorageFile.listFiles=function(b,f,g,c){b.getDatabaseItems(function(m){var n=[];if(null!=m)for(var v=0;v<m.length;v++)"."==m[v].title.charAt(0)||null!=f&&m[v].type!=f||n.push(m[v]);g(n)},function(){null==b.database?g(StorageFile.listLocalStorageFiles(f)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,f,g,c){b.removeDatabaseItem([f,f],g,function(){null==b.database?(localStorage.removeItem(f),g()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,f,g){StorageFile.call(this,b,f,g)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,g){this.saveFile(b,!1,f,g)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title}; StorageFile.listFiles=function(b,f,g,c){b.getDatabaseItems(function(m){var n=[];if(null!=m)for(var v=0;v<m.length;v++)"."==m[v].title.charAt(0)||null!=f&&m[v].type!=f||n.push(m[v]);g(n)},function(){null==b.database?g(StorageFile.listLocalStorageFiles(f)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,f,g,c){b.removeDatabaseItem([f,f],g,function(){null==b.database?(localStorage.removeItem(f),g()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,f,g){StorageFile.call(this,b,f,g)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,g){this.saveFile(b,!1,f,g)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(b,f,g){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,g){DrawioFile.call(this,b,f);this.title=g;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,f,g){RemoteFile.call(this,b,f,g.title);this.libObj=g};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,f,g){}; StorageLibrary.prototype.isRenamable=function(b,f,g){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,g){DrawioFile.call(this,b,f);this.title=g;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,f,g){RemoteFile.call(this,b,f,g.title);this.libObj=g};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,f,g){};
RemoteLibrary.prototype.saveAs=function(b,f,g){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,g){StorageFile.call(this,b,f,g);b=g;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,f,g){return!1};UrlLibrary.prototype.saveAs=function(b,f,g){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,g){DrawioFile.call(this,b,f);this.desc=g||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/* RemoteLibrary.prototype.saveAs=function(b,f,g){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,g){StorageFile.call(this,b,f,g);b=g;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,f,g){return!1};UrlLibrary.prototype.saveAs=function(b,f,g){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,g){DrawioFile.call(this,b,f);this.desc=g||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||(urlParams.title?decodeURIComponent(urlParams.title):"")};/*
mxClient.IS_IOS || */ mxClient.IS_IOS || */
var StorageDialog=function(b,f,g){function c(M,I,d,k,p,t){function u(){mxEvent.addListener(y,"click",null!=t?t:function(){d==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(d,!0);f()})):d==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(d,!0);f()}),function(x){b.spinner.stop();b.handleError(x)}): var StorageDialog=function(b,f,g){function c(M,I,d,k,p,t){function u(){mxEvent.addListener(y,"click",null!=t?t:function(){d==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(d,!0);f()})):d==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(d,!0);f()}),function(x){b.spinner.stop();b.handleError(x)}):
(b.setMode(d,!0),f())})}z++;++v>g&&(mxUtils.br(F),v=1);var y=document.createElement("a");y.style.overflow="hidden";y.style.display="inline-block";y.className="geBaseButton";y.style.boxSizing="border-box";y.style.fontSize="11px";y.style.position="relative";y.style.margin="4px";y.style.marginTop="8px";y.style.marginBottom="0px";y.style.padding="8px 10px 8px 10px";y.style.width="88px";y.style.height="100px";y.style.whiteSpace="nowrap";y.setAttribute("title",I);var D=document.createElement("div");D.style.textOverflow= (b.setMode(d,!0),f())})}z++;++v>g&&(mxUtils.br(F),v=1);var y=document.createElement("a");y.style.overflow="hidden";y.style.display="inline-block";y.className="geBaseButton";y.style.boxSizing="border-box";y.style.fontSize="11px";y.style.position="relative";y.style.margin="4px";y.style.marginTop="8px";y.style.marginBottom="0px";y.style.padding="8px 10px 8px 10px";y.style.width="88px";y.style.height="100px";y.style.whiteSpace="nowrap";y.setAttribute("title",I);var D=document.createElement("div");D.style.textOverflow=
@ -12964,8 +12964,8 @@ function(l){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&y("",140,160,"
function(l){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!m.isMouseInsertPoint()?null:m.getInsertPoint())},null,null,"F")).isEnabled=n;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(l){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!m.isMouseInsertPoint()? function(l){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!m.isMouseInsertPoint()?null:m.getInsertPoint())},null,null,"F")).isEnabled=n;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(l){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!m.isMouseInsertPoint()?
null:m.getInsertPoint())},null,null,"R")).isEnabled=n;c.actions.put("insertEdge",new Action(mxResources.get("line"),function(l){if(m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())){var x=m.defaultEdgeLength;l=null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!m.isMouseInsertPoint()?null:m.getInsertPoint();null==l&&(l=m.getCenterInsertPoint(m.getBoundingBoxFromGeometry([C],!0)));var C=new mxCell("",new mxGeometry(0,0,x,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");C.geometry.setTerminalPoint(l, null:m.getInsertPoint())},null,null,"R")).isEnabled=n;c.actions.put("insertEdge",new Action(mxResources.get("line"),function(l){if(m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())){var x=m.defaultEdgeLength;l=null==l||mxEvent.isControlDown(l)||mxEvent.isMetaDown(l)||!m.isMouseInsertPoint()?null:m.getInsertPoint();null==l&&(l=m.getCenterInsertPoint(m.getBoundingBoxFromGeometry([C],!0)));var C=new mxCell("",new mxGeometry(0,0,x,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");C.geometry.setTerminalPoint(l,
!0);C.geometry.setTerminalPoint(new mxPoint(l.x+C.geometry.width,l.y),!1);C.geometry.points=[];C.geometry.relative=!0;C.edge=!0;u(C)}},null,null,"C")).isEnabled=n;E=c.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=c.sidebarWindow?c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible()):c.toggleShapesPanel(!c.isShapesPanelVisible())},null,null,Editor.ctrlKey+"+Shift+K"));E.setToggleAction(!0);E.setSelectedCallback(mxUtils.bind(this,function(){return null!= !0);C.geometry.setTerminalPoint(new mxPoint(l.x+C.geometry.width,l.y),!1);C.geometry.points=[];C.geometry.relative=!0;C.edge=!0;u(C)}},null,null,"C")).isEnabled=n;E=c.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=c.sidebarWindow?c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible()):c.toggleShapesPanel(!c.isShapesPanelVisible())},null,null,Editor.ctrlKey+"+Shift+K"));E.setToggleAction(!0);E.setSelectedCallback(mxUtils.bind(this,function(){return null!=
c.sidebarWindow&&c.sidebarWindow.window.isVisible()||null==c.sidebarWindow&&0<c.hsplitPosition}));c.addInsertMenuItems=mxUtils.bind(this,function(l,x,C){for(var G=0;G<C.length;G++)"-"==C[G]?l.addSeparator(x):c.addInsertItem(l,x,mxResources.get(C[G])+"...",C[G])});this.put("insert",new Menu(mxUtils.bind(this,function(l,x){"sketch"==Editor.currentTheme?(c.menus.addMenuItems(l,["toggleShapes"],x),c.menus.addSubmenu("table",l,x),l.addSeparator(x),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(l, c.sidebarWindow&&c.sidebarWindow.window.isVisible()||null==c.sidebarWindow&&0<c.hsplitPosition}));c.addInsertMenuItems=mxUtils.bind(this,function(l,x,C){for(var G=0;G<C.length;G++)"-"==C[G]?l.addSeparator(x):c.addInsertItem(l,x,mxResources.get(C[G])+"...",C[G])});this.put("insert",new Menu(mxUtils.bind(this,function(l,x){"sketch"==Editor.currentTheme?(c.menus.addMenuItems(l,["toggleShapes"],x),c.menus.addSubmenu("table",l,x),l.addSeparator(x),c.insertTemplateEnabled&&c.menus.addMenuItems(l,
["insertTemplate"],x),c.menus.addMenuItems(l,["insertImage","insertLink","-"],x),c.menus.addSubmenu("insertAdvanced",l,x,mxResources.get("advanced")),c.menus.addSubmenu("layout",l,x)):(this.addMenuItems(l,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),x),c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(l,["insertTemplate"],x),l.addSeparator(x),"min"==uiTheme||"simple"==Editor.currentTheme? ["insertTemplate"],x),c.menus.addMenuItems(l,["insertImage","insertLink","-"],x),c.menus.addSubmenu("insertAdvanced",l,x,mxResources.get("advanced")),c.menus.addSubmenu("layout",l,x)):(this.addMenuItems(l,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),x),c.insertTemplateEnabled&&this.addMenuItems(l,["insertTemplate"],x),l.addSeparator(x),"min"==uiTheme||"simple"==Editor.currentTheme?
(this.addSubmenu("table",l,x),this.addSubmenu("layout",l,x)):this.addSubmenu("insertLayout",l,x,mxResources.get("layout")),this.addSubmenu("insertAdvanced",l,x,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,function(l,x){c.menus.addInsertTableCellItem(l,x)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(l,x){c.addInsertMenuItems(l,x,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced", (this.addSubmenu("table",l,x),this.addSubmenu("layout",l,x)):this.addSubmenu("insertLayout",l,x,mxResources.get("layout")),this.addSubmenu("insertAdvanced",l,x,mxResources.get("advanced")))})));this.put("table",new Menu(mxUtils.bind(this,function(l,x){c.menus.addInsertTableCellItem(l,x)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(l,x){c.addInsertMenuItems(l,x,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",
new Menu(mxUtils.bind(this,function(l,x){c.addInsertMenuItems(l,x,["fromText","plantUml","mermaid","-","formatSql"]);l.addItem(mxResources.get("csv")+"...",null,function(){m.popupMenuHandler.hideMenu();c.showImportCsvDialog()},x,null,n());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(l,["-","createShape","editDiagram"],x)})));this.put("openRecent",new Menu(function(l,x){var C=c.getRecent();if(null!=C){for(var G=0;G<C.length;G++)(function(K){var O=K.mode;O==App.MODE_GOOGLE? new Menu(mxUtils.bind(this,function(l,x){c.addInsertMenuItems(l,x,["fromText","plantUml","mermaid","-","formatSql"]);l.addItem(mxResources.get("csv")+"...",null,function(){m.popupMenuHandler.hideMenu();c.showImportCsvDialog()},x,null,n());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(l,["-","createShape","editDiagram"],x)})));this.put("openRecent",new Menu(function(l,x){var C=c.getRecent();if(null!=C){for(var G=0;G<C.length;G++)(function(K){var O=K.mode;O==App.MODE_GOOGLE?
O="googleDrive":O==App.MODE_ONEDRIVE&&(O="oneDrive");l.addItem(K.title+" ("+mxResources.get(O)+")",null,function(){c.loadFile(K.id)},x)})(C[G]);l.addSeparator(x)}l.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},x)}));this.put("openFrom",new Menu(function(l,x){null!=c.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},x):v&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+ O="googleDrive":O==App.MODE_ONEDRIVE&&(O="oneDrive");l.addItem(K.title+" ("+mxResources.get(O)+")",null,function(){c.loadFile(K.id)},x)})(C[G]);l.addSeparator(x)}l.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},x)}));this.put("openFrom",new Menu(function(l,x){null!=c.drive?l.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},x):v&&"function"===typeof window.DriveClient&&l.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+